Skip to content

Instantly share code, notes, and snippets.

View wridgers's full-sized avatar

Will Ridgers wridgers

View GitHub Profile
@wridgers
wridgers / gist:6992303
Created October 15, 2013 14:22
.ctags configuration file for Adobe ExtendScript. You can generate tags with: `find ./src -name "*.jsx" -exec ctags {} +`
--langdef=extendscript
--langmap=extendscript:.jsx
--regex-extendscript=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*\{/\5/,object/
--regex-extendscript=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*function[ \t]*\(/\5/,function/
--regex-extendscript=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*\[/\5/,array/
--regex-extendscript=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*[^"]'[^']*/\5/,string/
--regex-extendscript=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*(true|false)/\5/,boolean/
--regex-extendscript=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*[0-9]+/\5/,number/
--regex-extendscript=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*.+([,;=]|$)/\5/,variable/
@wridgers
wridgers / gist:7247262
Created October 31, 2013 10:06
Unite config for vim
" -------------------------------------------------------------------------------
" - unite
" -------------------------------------------------------------------------------
let g:unite_source_history_yank_enable = 1
let g:unite_data_directory='~/.vim/.cache/unite'
let g:unite_source_rec_max_cache_files=50000
let g:unite_enable_start_insert = 1
let g:unite_split_rule = "botright"
let g:unite_force_overwrite_statusline = 0
# this is the root
root = true
# universal settings
[*]
# tabs
indent_style = space
indent_size = 4
@wridgers
wridgers / client.js
Created November 30, 2014 02:30
Possible faye bug?
var faye = require('faye');
var client = new faye.Client('http://localhost:8000/');
client.subscribe('/test', console.log);
client.publish('/test', 'Hello world.');
() => {
const x = 'JiYoKCUnJSdCQQ=='
const s = atob(x).split('').map(c => c.charCodeAt(0))
let p = 0
document.addEventListener('keyup', ({keyCode}) => {
p += (s[p] == keyCode) ? 1 : -p
if (p === 10) {
console.log('ACTIVATED')
@wridgers
wridgers / yes.asm
Last active January 25, 2019 00:58
; nasm -f elf64 yes.asm
; gcc -o yes yes.o
; ./yes | pv -a > /dev/null
global main
section .text
main:
mov rdi, 1
mov rsi, msg
function ,() {
local dir="."
local search="."
# todo: check for fzf, rg, bat, tree, and fd.
if [ -n "$1" ]; then
if test -f $1; then
$EDITOR $1
return