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 link/subl-file () | |
"Edit current file in subl." | |
(interactive) | |
(shell-command (format "subl -n %s:%s" | |
(buffer-file-name) | |
(line-number-at-pos)))) | |
(evil-define-operator link/subl-line (beg end type) | |
"Edit current region in subl." | |
:motion evil-line | |
(interactive "<R>") |
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
/opt/homebrew-cask/Caskroom/emacs-mac/emacs-24.5-z-mac-5.7/Emacs.app/Contents/MacOS/Emacs -Q --batch --eval "(progn (require 'org) (setq org-src-preserve-indentation t) (org-babel-tangle-file \"/Users/link/Dropbox/Researchs/Thesis/simple_thesis.org\"))" |
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
;; Map CapsLock to LCtrl | |
;; LAtl to RCtrl | |
;; LCtrl to RAlt | |
;; using SharpKeys first | |
>^Tab::AltTab | |
>^q::Send, !{F4} | |
;; Not Emacs, not Console | |
#IfWinNotActive ahk_class Emacs |
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
clear lock | |
clear control | |
clear mod1 | |
clear mod4 | |
! Caps_Lock | |
keycode 66 = Control_L | |
! Control_L | |
keycode 37 = Super_L | |
! Super_L |
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
#!/bin/sh | |
if [ $1 = "-" ]; then | |
shift | |
TEMP=$(mktemp) | |
cat > $TEMP | |
/opt/sublime_text/sublime_text -w $TEMP "$@" | |
cat $TEMP | |
rm -rf $TEMP | |
else | |
exec /opt/sublime_text/sublime_text "$@" |
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
function waitFor(testFx, onReady, timeOutMillis) { | |
return new Promise(function (resolve, reject) { | |
var maxtimeOutMillis = timeOutMillis ? timeOutMillis : 3000, | |
start = new Date().getTime(), | |
condition = false, | |
interval = setInterval(function() { | |
if ((new Date().getTime() - start < maxtimeOutMillis) && !condition) { | |
condition = (typeof(testFx) === "string" ? eval(testFx) : testFx()); | |
} else { | |
if(!condition) { |
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 Promise = (function() { | |
var Promise = function(callback) { | |
this._done = []; | |
this._fail = []; | |
this.state = 'pending'; | |
this.value = undefined; | |
callback && callback(this.resolve.bind(this), this.reject.bind(this)); | |
}; | |
Promise.prototype = { | |
resolve: function(value) { |
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
(setq popwin:special-display-config | |
(append '(("^\*helm .+\*$" :regexp t :position right :width 60) | |
("^\*helm-.+\*$" :regexp t :position right :width 60)) | |
popwin:special-display-config)) | |
(add-hook 'helm-after-initialize-hook (lambda () | |
(popwin:display-buffer helm-buffer t) | |
(popwin-mode -1))) | |
(add-hook 'helm-cleanup-hook (lambda () (popwin-mode 1))) |
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
server.document-root = "/home/link/Downloads" | |
server.port = 3000 | |
mimetype.assign = ( | |
".html" => "text/html", | |
".txt" => "text/plain", | |
".jpg" => "image/jpeg", | |
".png" => "image/png" | |
) |
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
function lastpass () { | |
url="" | |
username="" | |
password="" | |
function fill() { | |
pb=$(pbpaste) | |
osascript -e 'tell application "System Events" to keystroke tab using command down' | |
echo "$username" | pbcopy | |
osascript -e 'tell application "System Events" to keystroke "v" using command down' | |
osascript -e 'tell application "System Events" to keystroke tab' |