Fix MacOS 10.15 Clang Link

Cannot build C program after upgrade to MacOS-10.15 Why This is because apple change the path to the clang, those fundamental things are collected into /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk Following these steps open terminal and install xcode developer tools by xcode-select --install make link in /usr/local/include/ sudo ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/* /usr/local/include/ (Update) Install Ruby with rbenv rbenv directly compile Ruby from source code. Therefore, we can still see some core files are missing in /usr.

Php & Apache & Mysql

Environment for DiscuzX3.0 on Ubuntu Install php5.6 Add source first sudo add-apt-repository ppa:ondrej/php Install sudo apt-get update sudo apt-get install -y php5.6 Mysql5.7 install sudo apt-get install mysql sudo mysql -u root in mysql use this line to set password for root UPDATE mysql.user SET plugin="mysql_native_password", authentication_string=PASSWORD("password") WHERE user="root"; SET GLOBAL validate_password_policy=0; restart, then you can login as root with password sudo service mysql restart Apache is easy sudo apt-get install apache2 DiscuzX3.

Use Vscode Ssh Remote

Use Visual Studio Code with Remote Machine

Vscode has just publish new plugins with its insider version. Download Link

New feature, new plugin

This set of plugins are named Remote-SSH tools.

new plugins

Configuration

use command+P to open command palette and edit the local config file like this.

commad palette

config

Try it!

Then you can try to connect your server with Vscode locally. Really nice feature, I love vscode more!!

cool

Work on Pandas, Numpy and Matplotlib

Work on Numpy, Pandas and Matplotlib These three libs are really useful in data analysis. I use a piece on dataset in Kaggle to show a little demo of using these libraries. Import CVS as data CVS files cannot be manipulated directly by python, therefore we use Pandas to convert it into what we need. import numpy as np import pandas as pd import matplotlib.pyplot as plt data = pd.read_csv('other-American_B01362.csv') x = data.

New Mac Settings for OBSESSIONS

强迫症的新Macbook设置指南

新mac到了,想要保持以前的使用习惯还是要配置一番,边配置边写咯

触摸板三指拖移

三指拖移在设置>辅助功能>鼠标与触摸板>触摸板选项,启动拖移中选择三指拖移。

显示电量百分比

确认节能器的显示电源状态已经打勾(默认),在屏幕顶上菜单条中点击电池,选择显示电池百分比。

brew安装

首先下载brew的安装脚本brew安装脚本 ruby brew_install.rb

链接brewcask

brew tap caskroom/cask

用brew安装一切

python3 brew cask install java …… 所有的软件源管理都在brew中,yarnpipnpm都通过brew安装。

brew cask安装小插件

包括quicksilvergo2shell

轻度修改.vimrc

只添加三行,显示一下高亮代码即可

syntax enable
syntax on
colorscheme desert

配置shell

在shell的设置中将默认shell改为zsh,我没有使用iTerm2,用的就是Mac自带的终端,改成自己喜欢的颜色和字体就好

git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

配置quick look

使用“一指禅”来查看各种文件,包括代码高亮和视频等。 脚本链接quick look安装脚本

用virtual box安装ubuntu

有的时候不的不用linux(T—T!) vmware碰到了显示不全的问题,安装进行不下去;如果使用快速安装则不能装增强应用。感觉很坑,遂弃之。 parallel desktop碰到的问题是安装后重启不能进入系统,也弃了。 回到virtual box,勉强用一用也可以,增强应用如果装不上先sudo apt-get upgrade,升级了依赖就能装上了。 安装增强之后我做到了双向共享剪贴板(文字),但不能系统间文件拖拽。 共享文件夹在安装增强应用后会自动挂在在/media文件夹下,如果不能访问共享文件夹,把本机用户添加到vboxsf用户组就好了。 这个虚拟机先凑合使着

安装win双系统

剩下的随用随装

包括intellij idea,pycharm,anaconda等等

Try Tensorflow on mac

Use Tensorflow on my Macbook two ways to install docker virtualenv use virtualenv to install Tensorflow first we get python and pip with us via brew on mac -> python3 --verion Python 3.6.4 -> pip3 --version pip 9.0.1 from /usr/local/lib/python3.6/site-packages (python 3.6) use pip to install virtualenv pip3 install --upgrade virtualenv after we get virtualenv, use this tool to create a virtual environment of tensoflow -> virtualenv --system-site-packages -p python3 .

Delete & Reinstall Mysql on Mac

Delete and re-install Mysql Way to completely delete Mysql on Macbook It is hard to delete Mysql completely on mac, because it is not in /Application folder and it has many parts deperated in different places. Following the terminal command below sudo rm /usr/local/mysql sudo rm -rf /usr/local/mysql* sudo rm -rf /Library/StartupItems/MySQLCOM sudo rm -rf /Library/PreferencePanes/My* vim /etc/hostconfig /* remove the line "MYSQLCOM=-YES-" and save the file if you do not have this file before just skip this step */ rm -rf ~/Library/PreferencePanes/My* sudo rm -rf /Library/Receipts/mysql* sudo rm -rf /Library/Receipts/MySQL* sudo rm -rf /var/db/receipts/com.

Remote Linux Command

I have to work on Linux Server remotely these days. So I would like to take this as a note of commands on manipulating remote files. ssh command shell to login remote machine without entering password set user abc123 set host 192.168.0.2 set password [your password] set timeout -1 spawn ssh $user@$host expect "*assword:*" send "$password\r" interact expect eof scp command your user name is abc123 and you want to copy file this.

Hugo + macdown + Terminal

Editor Hugo is easy to use macdown is enough for me to write md files macdown is free :-p Terminal tool macdown terminal tool can directly open macdown files from terminal Then the terminal is the only thing I need to start writing and deploy In the future I will try to write a image hoster. Acturally I don’t have to, but I would like to take this as a kind of practice.

Hugo + Github Pages

Install Hugo Install hugo following the instruction of the linked document is a piece of cake. Homebrew is a fantastic tool for mac users. After installation, Hugo new site myblog will generate a project called myblog for you. Things in /myblog is the source code of your blog. Choose a Theme Actually, I don’t feel those themes on Hugo official website are of good look. Some of them are not really easy to use because of their poor ducumentation.