diff --git a/.gitignore b/.gitignore index 041f4fe..d738a16 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ vim/view .netrwhist chromedriver config/fish/fishd.* +emacs.d/elpa diff --git a/INSTALL.sh b/INSTALL.sh index efdf83d..0a84778 100755 --- a/INSTALL.sh +++ b/INSTALL.sh @@ -18,6 +18,7 @@ rm -rf ~/.gitignore rm -rf ~/.git_template rm -rf ~/.hushlogin rm -rf ~/.vim +rm -rf ~/.emacs rm -rf ~/.vimrc rm -rf ~/.zshrc rm -rf ~/.pythonstartup.py @@ -34,6 +35,7 @@ ln -s $(pwd)/gitconfig ~/.gitconfig ln -s $(pwd)/gitignore ~/.gitignore ln -s $(pwd)/git_template ~/.git_template ln -s $(pwd)/hushlogin ~/.hushlogin +ln -s $(pwd)/emacs ~/.emacs ln -s $(pwd)/vim ~/.vim ln -s $(pwd)/vimrc ~/.vimrc ln -s $(pwd)/zshrc ~/.zshrc diff --git a/bin/mysql_in_ram.sh b/bin/mysql_in_ram.sh index e7be843..31bd535 100755 --- a/bin/mysql_in_ram.sh +++ b/bin/mysql_in_ram.sh @@ -1,31 +1,14 @@ #!/bin/bash set -v -if [[ $OSTYPE == "darwin*" ]];then - umount /Volumes/ramdisk - mysql.server stop - killall mysqld - killall mysqld - killall mysqld - killall mysqld - killall mysqld - killall mysqld - diskutil erasevolume HFS+ "ramdisk" `hdiutil attach -nomount ram://2048000` - cp -r /usr/local/var/mysql /Volumes/ramdisk - mysql.server start -else - sudo service mysql stop - - # This works on Ubuntu 14.04, but not 16.04: - # sudo mkdir -p /mnt/mysql-data-orig - # sudo mount --bind /var/lib/mysql /mnt/mysql-data-orig - # sudo mount -t tmpfs -o size=32G,uid=mysql,gid=mysql,mode=700 tmpfs /var/lib/mysql - # sudo sh -c 'cp -avi /mnt/mysql-data-orig/* /var/lib/mysql/' - - # This works on 16.04 and maybe elsewhere too - sudo mkdir -p /mnt/mysql-ram - sudo mount -t tmpfs -o size=8G,uid=mysql,gid=mysql,mode=700 tmpfs /mnt/mysql-ram - sudo mount -t aufs -o br:/mnt/mysql-ram:/var/lib/mysql=ro aufs /var/lib/mysql - - sudo service mysql start -fi +umount /Volumes/ramdisk +mysql.server stop +killall mysqld +killall mysqld +killall mysqld +killall mysqld +killall mysqld +killall mysqld +diskutil erasevolume HFS+ "ramdisk" `hdiutil attach -nomount ram://2048000` +cp -r /usr/local/var/mysql /Volumes/ramdisk +mysql.server start diff --git a/emacs b/emacs new file mode 100644 index 0000000..2226e56 --- /dev/null +++ b/emacs @@ -0,0 +1,53 @@ +(require 'package) + +(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/")) +(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/")) +(add-to-list 'package-archives '("melpa-stable" . "http://stable.melpa.org/packages/")) + +(setq package-enable-at-startup nil) +(setq sml/theme 'dark) +(package-initialize) +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(custom-safe-themes + (quote + ("3c83b3676d796422704082049fc38b6966bcad960f896669dfc21a7a37a748fa" "c74e83f8aa4c78a121b52146eadb792c9facc5b1f02c917e3dbb454fca931223" "a27c00821ccfd5a78b01e4f35dc056706dd9ede09a8b90c6955ae6a390eb1c1e" default))) + '(package-selected-packages + (quote + (neotree smart-mode-line powerline magit use-package helm evil-visual-mark-mode)))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + ) +(use-package evil + :ensure t + :config + (evil-mode 1) + ;; More configuration goes here + ) +(use-package magit) + +(use-package smart-mode-line + :ensure t + :config + (sml/setup) +) +(use-package powerline + :ensure t + :config + (powerline-center-evil-theme) +) +; https://www.emacswiki.org/emacs/NeoTree +(use-package neotree + :ensure t + :config + (global-set-key [f8] 'neotree-toggle) +) +;; Set Powerline Configuration +(setq powerline-arrow-shape 'curve) +(setq powerline-default-separator-dir '(right . left)) diff --git a/gitconfig b/gitconfig index e880ea7..695704d 100644 --- a/gitconfig +++ b/gitconfig @@ -42,3 +42,9 @@ newHighlight = green bold 22 [init] templatedir = ~/.git_template +[difftool "sourcetree"] + cmd = opendiff \"$LOCAL\" \"$REMOTE\" + path = +[mergetool "sourcetree"] + cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\" + trustExitCode = true diff --git a/zshrc.local b/zshrc.local index 72ce010..f02869d 100644 --- a/zshrc.local +++ b/zshrc.local @@ -45,3 +45,4 @@ if [ -e $HOME/.credentials ];then fi source ~/.bash_aliases +unsetopt share_history