This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function em () { | |
| EMACS_SERVER_SOCKET_FILE="$TMPDIR/emacs$UID/server" | |
| if [[ -S "$EMACS_SERVER_SOCKET_FILE" ]]; then | |
| emacsclient -n "$@" | |
| else | |
| open -a /Applications/Emacs.app/Contents/MacOS/Emacs "$@" | |
| fi | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MY_PROJECT_GEMSET='filebucket' | |
| MY_PROJECT_RUBY_AND_GEMSET=$( \ | |
| rvm gemset list_all \ | |
| | awk '/^gemset/{ruby = $3}; /^ /{print ruby "@" $1}' \ | |
| | grep "@$MY_PROJECT_GEMSET\$" \ | |
| | tail -1 | |
| ) | |
| if [ -n "$MY_PROJECT_RUBY_AND_GEMSET" ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (global-set-key [(meta ?+)] (lambda () (interactive) (text-scale-increase 1))) | |
| (global-set-key [(meta ?-)] (lambda () (interactive) (text-scale-increase -1))) | |
| (global-set-key [(meta ?0)] (lambda () (interactive) (text-scale-increase 0))) | |
| (global-set-key [(meta ?8)] (lambda () (interactive) (toggle-current-background-type))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # Usage: caldav-delete-all <calendarname> | |
| # | |
| # <calendarname>: calendar name found in ~/.mhc/config.yml | |
| if File.symlink?(__FILE__) and ENV["RBENV_VERSION"] | |
| ENV["RBENV_VERSION"] = nil | |
| shims_path = File.expand_path("shims", ENV["RBENV_ROOT"]) | |
| ENV["PATH"] = shims_path + ":" + ENV["PATH"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| CMD_NAME=`basename $0` | |
| OLD_MHC_TOP_DIR="${1%/}" # remove trailing slash | |
| NEW_MHC_TOP_DIR="${2%/}" # remove trailing slash | |
| LOG_FILE="$NEW_MHC_TOP_DIR/$CMD_NAME$$.log" | |
| usage() { | |
| echo "Usage: $CMD_NAME <top-dir> <new-top-dir>" | |
| echo " $CMD_NAME copies old mhc files from <top-dir> into" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| BOT_ID="nomnichi_bot" | |
| ROOM="nomlab" | |
| SECRET="XXXXXXXXXXXXXXXXXXXXXXXXXXX" | |
| BASE_URL='http://lingr.com/api/room/say' | |
| bot_verifier=`echo -n "$BOT_ID$SECRET" | openssl dgst -sha1 | sed 's/^.* //'` | |
| URL="$BASE_URL?room=$ROOM&bot=$BOT_ID&bot_verifier=$bot_verifier" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \documentclass[10pt, conference, compsocconf]{IEEEtran} | |
| \usepackage[dvipdfm]{graphicx} | |
| \begin{document} | |
| \title{Writing papers} | |
| \author{\IEEEauthorblockN{ | |
| Taro Momo, | |
| Saru Kiji, | |
| and | |
| Aka Oni} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### | |
| ### Makefile for LaTeX documents | |
| ### | |
| ### Yoshinari Nomura | |
| ### | |
| ### GNU make 3.81 will work for you. | |
| ### | |
| ##################################################################### | |
| # Typeset commands and path settings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (when (and (>= emacs-major-version 24) | |
| (eq window-system 'ns)) | |
| ;; フォントセットを作る | |
| (let* ((fontset-name "myfonts") ; フォントセットの名前 | |
| (size 14) ; ASCIIフォントのサイズ [9/10/12/14/15/17/19/20/...] | |
| (asciifont "Menlo") ; ASCIIフォント | |
| (jpfont "Hiragino Maru Gothic ProN") ; 日本語フォント | |
| (font (format "%s-%d:weight=normal:slant=normal" asciifont size)) | |
| (fontspec (font-spec :family asciifont)) | |
| (jp-fontspec (font-spec :family jpfont)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (add-private-load-path "auto-complete") | |
| (require 'popup) | |
| (defun dic-at-point () | |
| (interactive) | |
| (let* ((word (word-at-point)) | |
| (desc (and word (shell-command-to-string (format "dic '%s'" word))))) | |
| (when (and desc (null popup-instances)) | |
| (popup-tip desc :margin t)))) |