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 razzi-associate-extension-mode (extension mode) | |
"Associate a file extension with an editing mode. | |
For example, (razzi-associate-extension-mode \"js\" 'javascript-mode)" | |
(let ((pattern (concat "\\." extension "$"))) | |
(add-to-list 'auto-mode-alist (cons pattern mode)))) |
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 space = String.fromCharCode(32) | |
const at_symbol = String.fromCharCode(64) | |
const newline = String.fromCharCode(10) | |
const openb = String.fromCharCode(91) | |
const closb = String.fromCharCode(93) | |
const quote = String.fromCharCode(39) | |
const comma = String.fromCharCode(44) | |
function represent(ss) { | |
return ss.join(newline).replace( | |
at_symbol, |
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
syntax enable | |
filetype plugin indent on | |
set tabstop=4 | |
set smartindent | |
let mapleader = ' ' | |
nnoremap <leader>q :q<cr> | |
nnoremap <leader><leader> :w<cr> |
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
from urllib.parse import urlparse | |
database_url = input() | |
parsed = urlparse(database_url) | |
parts = { | |
'port': parsed.port, | |
'dbname': parsed.path[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
from urllib.parse import urlparse | |
database_url = input() | |
parsed = urlparse(database_url) | |
parts = { | |
'port': parsed.port, | |
'dbname': parsed.path[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
<html> | |
<head> | |
<meta charset="utf-8" /> | |
</head> | |
<body> | |
<script> | |
const KEY_NAMES = { | |
enter: 'ret', | |
' ': 'spc', | |
escape: 'esc', |
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 toTest(a, b) { | |
return a + b | |
} | |
function debug(fn) { | |
return function() { | |
console.log(`Going to call ${fn.name} with ${[].slice.call(arguments).join(', ')}`) | |
result = fn.apply(this, arguments) | |
console.log(`Got result from ${fn.name} of`, result); | |
return result |
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
<html> | |
<head> | |
<meta charset="utf-8" /> | |
</head> | |
<body> | |
<script> | |
function parseKeyname(keyname) { | |
const parts = keyname.toLowerCase().split('-') | |
const modifiers = parts.slice(0, -1) | |
const key = parts[parts.length - 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
function album --argument the_album | |
set script (echo "\ | |
for f in \"$the_album\"*.{flac,mp3,m4a}; | |
afplay \"\$f\"; | |
end | |
") | |
begin | |
fish -c "$script" | |
end | |
end |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Disabled</key> | |
<false/> | |
<key>KeepAlive</key> | |
<false/> | |
<key>RunAtLoad</key> | |
<true/> |
NewerOlder