$ brew install sl
$ sl
以上。
;; load environment variables ------------------------------- (let ((envs '("PATH" "C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH" "TEXINPUTS" "BSTINPUTS" "BIBINPUTS"))) (exec-path-from-shell-copy-envs envs))これで.zshrcの方だけで管理しておくことができます。
git config --global user.name "Your Name" git config --global user.email "your_email@example.com"そうすると、「~/.gitconfig」に以上の内容が書き込まれます。
cd programそしたらば、次はそのフォルダをGitの対象にするために以下のコマンドを入力します。
git initこれで、「program」の中に「.git」というフォルダができます。
git add .ドット(.)があることに注意してください。
git commit -m "First commit."このcommitまでやって始めて一つのバージョンができあがります。
git add text.txt git commit -m "text.txt is modified."とします。
git add -AこれでOKです。
git commit -aこれでgit add -A してgit commitしたことと同じになります。
# Emacs temp files *~ [#]*[#] .\#*といった具合に正規表現(正式にはglobパターン)が使えます。
ssh-keygen -t rsa -C "your_email@example.com"
git remote add origin https://github.com/user-name/program.gitBitbucketなら以下です。
git remote add origin ssh://git@bitbucket.org/user-name/program.git以上のコマンドはさっき残しておけと書いたページに書いてあるのでコピペでいけます。
git push -u origin masterこうすると転送が始まってサイト上にアップロードされるというわけです。
git pull origin masterって打てばどちらのファイルも維持されたまま併合(マージ)されます。
git pushとやれば、その日の変更履歴がサイト上にアップロードされるというわけです。
git clone https://github.com/user-name/program.gitでできます。
git clone https://user-name@bitbucket.org/user-name/program.gitこの中に.gitフォルダも既に含まれているはずなので、そのPCのSSHキーの登録が済んでいればgit remoteの設定なんかは要らずに、
git pushこれだけでそのPC内の変更がサイト上に反映されるはずです。
git pullこれだけでサイト上の最新版に更新できるはずです。
$crontab -e ;;特に設定していない人はvimが起動するはずです。 ;;cronが起動します */15 * * * * /usr/bin/purge ;;上を追加して上書き保存 ;;15分おきにpurgeします
00 10-23/3 * * * * /usr/bin/purge ;;毎日10~23の間3時間おきにpurgeする ;;私は23時以降、Macを触ることはありません。
10 3-6 * * 5,6,7 /usr/bin/purge ;;毎週金、土、日のAM3〜6時10分にpurge
;; 自作のpurgeする関数 (defun purge () (interactive) (message "purging...") (shell-command (format "purge")) (message "Finished.")) (global-set-key "\C-c\C-p" 'purge)C-c C-pでパージ出来ます。
# 引数1個めと2個めは入力ファイル、出力ファイル function cc(){ arg=("$@") command="gcc -O3 -g -Wall ${arg[1]} -o ${arg[2]} -lmylib" if [ $# -gt 2 ]; then for i in `seq 3 $#` do command="${command} ${arg[$i]}" done fi echo $command eval $command }ここでは-lmylibは必ず使うという前提でやってます。
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that the RSA host key has just been changed. The fingerprint for the RSA key sent by the remote host is e5:99:11:ec:f7:f5:61:fa:41:c2:04:76:9b:0f:68:1f. Please contact your system administrator. Add correct host key in /var/root/.ssh/known_hosts to get rid of this message. Offending key in /var/root/.ssh/known_hosts:1 ← ☆ここ☆ RSA host key for [接続先IP] has changed and you have requested strict checking. Host key verification failed.もし出た場合は,☆ここ☆と書いてある行に示されているファイルをemacsなりviなりで開いて,接続先IPの行を消すと,次接続した時にホスト情報が再作成されてたぶん直ります.
(server-start) (defun non-elscreen-current-directory () (let* (current-dir (current-buffer (nth 1 (assoc 'buffer-list (nth 1 (nth 1 (current-frame-configuration)))))) (active-file-name (with-current-buffer current-buffer (progn (setq current-dir (expand-file-name (cadr (split-string (pwd))))) (buffer-file-name))))) (if active-file-name (file-name-directory active-file-name) current-dir)))
alias eclient="/Applications/Emacs.app/Contents/MacOS/bin/emacsclient" function cde () { EMACS_CWD=`eclient -e " (if (featurep 'elscreen) (elscreen-current-directory) (non-elscreen-current-directory))" | sed 's/^"\(.*\)"$/\1/'` echo "chdir to $EMACS_CWD" cd "$EMACS_CWD" } function dired () { eclient -e "(dired \"$PWD\")" }
;; term+ (add-to-list 'load-path "~/emacslib/termplus") (require 'term+) (require 'xterm-256color) (require 'term+mux) ;; Find available shell (defun skt:shell () (or (executable-find "zsh") ;; bashユーザは一行下と入れ替え (executable-find "bash") (error "No shell program was found in your PATH..."))) ;; Set shell-name (setq shell-file-name (skt:shell)) (setenv "SHELL" shell-file-name) (setq explicit-shell-file-name shell-file-name) ;; Setup sufficient moji-codes for Mac (setq system-uses-terminfo nil) (prefer-coding-system 'utf-8) (require 'ucs-normalize) (setq file-name-coding-system 'utf-8-hfs) (setq locale-coding-system 'utf-8-hfs) ;; Color settings for term (setq term-default-bg-color "Black") (autoload 'ansi-color-for-comint-mode-on "ansi-color" "Set `ansi-color-for-comint-mode' to t." t) ;; Binding key (global-unset-key "\C-t") (global-set-key "\C-t" '(lambda () (interactive) (ansi-term shell-file-name)))