View prettier.el
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 shell-command-on-buffer (command) | |
"run a command on the current file and revert the buffer" | |
(interactive "sCommand:") | |
(shell-command | |
(format "%s %s" | |
command | |
(shell-quote-argument (buffer-file-name)))) | |
(revert-buffer t t t)) | |
(defun prettier-js-on-buffer () |
View day-night-switch.el
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 daylight-mode () | |
(interactive) | |
(mapc #'disable-theme custom-enabled-themes) | |
(setq fci-rule-color "lightgray") | |
(load-theme 'adwaita t) | |
(load-theme 'tango t)) | |
(defun night-mode () | |
(interactive) | |
(mapc #'disable-theme custom-enabled-themes) |
View conkeror-org-protocol-capture.js
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
// Integration with Conkeror | |
// For Firefox, see https://addons.mozilla.org/ru/firefox/addon/org-mode-capture/ | |
function org_capture (url, title, selection, window) { | |
// Note the 'w' as capture template | |
var cmd_str = 'emacsclient \"org-protocol://capture:/w/'+url+'/'+title+'/'+selection+'\"'; | |
if (window != null) { | |
window.minibuffer.message('Issuing ' + cmd_str); | |
} |
View gist:8826e0302bd52db8f792
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
(dir-locals-set-class-variables 'smallindent-directory | |
'((nil . ((web-mode-markup-indent-offset . 2) | |
(web-mode-css-indent-offset . 2) | |
(web-mode-code-indent-offset . 2) | |
(js-indent-level . 2) | |
(whitespace-mode . -1) | |
(coffee-tab-width . 2) | |
(js2-basic-offset . 2) | |
)))) |
View gist:5760552
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
PermitLocalCommand true | |
host localhost app* whatever_db* *exgirlfriendnameblog.net | |
user root | |
port 6666 | |
LocalCommand echo -e "\033]11;#ff0000\007" |
View gist:5433977
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 | |
mplayer $(find $(for i in `pgrep -f flashplayer`; do echo /proc/$i/fd/; done) -lname "*Flash*") |
View gist:5371680
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
myLayout = ( (layoutN 1 (relBox 0 0 0.5 1) (Just $ relBox 0 0 1 1) $ simpleTabbed) | |
$ (layoutAll (relBox 0.5 0 1 1) $ simpleTabbed) | |
) ||| | |
( (layoutN 1 (relBox (1/3) 0 (1/2) 1) (Just $ relBox 0 0 1 1) $ Tall 0 0.01 0.5) | |
$ (layoutR 0.1 0.5 (relBox (2/3) 0 1 1) Nothing $ Tall 0 0.01 0.5) | |
$ (layoutAll (relBox 0 0 (1/3) 1) $ Tall 0 0.01 0.5) | |
) ||| | |
( (layoutN 1 (absBox (-512-200) 0 512 0) (Just $ relBox 0 0 1 1) $ simpleTabbed) | |
$ (layoutN 1 (absBox (-200) 0 0 0) Nothing $ simpleTabbed) | |
$ (layoutAll (absBox 0 0 (-512-200) 0) $ simpleTabbed) |
View asound.conf
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
pcm.!default plug:both | |
ctl.!default { | |
type hw | |
card 0 | |
} | |
pcm.both { | |
type route; | |
slave.pcm { |
View mozilla_notification.js
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 notification(title, body){ | |
Components.classes['@mozilla.org/alerts-service;1']. | |
getService(Components.interfaces.nsIAlertsService). | |
showAlertNotification(null, title, body, false, '', null); | |
} |
View masterwindow.js
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
const OPEN_MASTER_WINDOW = 7; | |
function master_window () { | |
let windowMediator = Components.classes["@mozilla.org/appshell/window-mediator;1"] | |
.getService(Components.interfaces.nsIWindowMediator); | |
let windows = windowMediator.getEnumerator(null); | |
let max_width = 0; | |
let master = null; | |
while (windows.hasMoreElements()) { | |
let win = windows.getNext() |
NewerOlder