This file contains 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
var UA = (function(ua) { | |
var browsers = { | |
// Capture: Major#, #2, #3, #4, alphaBeta, alphaBeta# | |
ie: /InternetExplorer/ | |
, fx: /firefox\/(\d+)(?:\.(\d+))?(?:\.(\d+))?(?:\.(\d+))?(?:(a|b)(\d*))?/i | |
, cr: /Chrome/ | |
, sf: /Safari/ | |
, op: /Opera/ | |
}, key, ret, obj = {}; |
This file contains 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
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document url-prefix(https://www.google.co.jp/reader), | |
url-prefix(https://www.google.com/reader) { | |
#gb:not(:hover), | |
#gb:not(:hover) > * { | |
max-height: 5px !important; | |
} |
This file contains 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
(defun exec-shell-command-sync (command &rest args) | |
(let (ret | |
(process | |
(apply 'start-process-shell-command "exec" nil command args))) | |
(set-process-filter | |
process | |
'(lambda (process output) | |
(setq ret (cons output ret)) | |
)) | |
(while (not (equalp (process-status process) 'exit)) |
This file contains 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 opened from Desktep entry, PATH won't be set to shell's value. | |
(let ((path-str | |
(replace-regexp-in-string | |
"\n+$" "" (shell-command-to-string "echo $PATH")))) | |
(setenv "PATH" path-str) | |
(setq exec-path (nconc (split-string path-str ":") exec-path))) |
This file contains 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
walk = (obj, fn, map = 'root') -> #fn(map, leaf) | |
if obj instanceof Array | |
for o in obj | |
walk o, fn, map + "[#{_i}]" | |
else if typeof obj is 'object' | |
for key of obj | |
walk obj[key], fn, map + ".#{key}" | |
else | |
fn map, obj |
This file contains 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
(define-key 'evil-motion-state-map "j" evil-next-visual-line) | |
(define-key 'evil-motion-state-map "k" evil-previous-visual-line) |
This file contains 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
require 'formula' | |
class Emacs < Formula | |
homepage 'http://www.gnu.org/software/emacs/' | |
url 'http://ftp.gnu.org/pub/gnu/emacs/emacs-24.1.tar.gz' | |
md5 '97b78dece2b4fd617dfab26b7db2d4bc' | |
depends_on "autoconf" => :build | |
if ARGV.include? "--use-git-head" |
This file contains 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
require 'formula' | |
class Emacs < Formula | |
homepage 'http://www.gnu.org/software/emacs/' | |
url 'http://ftpmirror.gnu.org/emacs/emacs-24.2.tar.bz2' | |
mirror 'http://ftp.gnu.org/pub/gnu/emacs/emacs-24.2.tar.bz2' | |
sha1 '38e8fbc9573b70a123358b155cf55c274b5a56cf' | |
if ARGV.include? "--use-git-head" | |
head 'http://git.sv.gnu.org/r/emacs.git' |
This file contains 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
;; auto-complete-mode | |
(setq ac-modes (append ac-modes '(objc-mode))) | |
(add-to-list 'load-path (expand-file-name "~/.emacs.d/vendor")) ;; Set your own Path to auto-complete-clang.el | |
(setq ac-clang-flags (list "-D__IPHONE_OS_VERSION_MIN_REQUIRED=30200" "-x" "objective-c" "-std=gnu99" "-isysroot" xcode:sdk "-I." "-F.." "-fblocks")) | |
(require 'auto-complete-clang) | |
;; (setq ac-clang-prefix-header "stdafx.pch") | |
;; (setq ac-clang-flags '("-w" "-ferror-limit" "1")) | |
;(setq clang-completion-flags (list "-Wall" "-Wextra" "-fsyntax-only" "-ObjC" "-std=c99" "-isysroot" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk" "-I." "-F.." "-D__IPHONE_OS_VERSION_MIN_REQUIRED=30200")) | |
(add-hook 'objc-mode-hook | |
(lambda () (setq ac-sources (append '(ac-source-clang |
This file contains 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
$ brew install global --with-exuberant-ctags | |
$ brew link --overwrite ctags #remove ctags not exuberant |