Skip to content

Instantly share code, notes, and snippets.

Avatar

Will Ridgers wridgers

View GitHub Profile
View yes.asm
; 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
View easteregg.js
() => {
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 / client.js
Created Nov 30, 2014
Possible faye bug?
View client.js
var faye = require('faye');
var client = new faye.Client('http://localhost:8000/');
client.subscribe('/test', console.log);
client.publish('/test', 'Hello world.');
View gist:8473606
# this is the root
root = true
# universal settings
[*]
# tabs
indent_style = space
indent_size = 4
@wridgers
wridgers / gist:7247262
Created Oct 31, 2013
Unite config for vim
View gist:7247262
" -------------------------------------------------------------------------------
" - 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
@wridgers
wridgers / gist:6992303
Created Oct 15, 2013
.ctags configuration file for Adobe ExtendScript. You can generate tags with: `find ./src -name "*.jsx" -exec ctags {} +`
View gist:6992303
--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/
View gist:6069180
#!/bin/sh
echo 'git submodules...'
git submodule --quiet init
git submodule --quiet update
echo 'vim...'; cp ./vimrc ~/.vimrc
rm -rf ~/.vim
if [ ! -d ~/.vim/ ]; then
View gist:5050411
<tr>
<td>
<table border="0" class="comment-table" level="1" id="5293602">
<tbody>
<tr>
<td style="border-right-width: 2px; border-right-style: solid; border-right-color: rgb(255, 102, 0);"><img src="/sslyc/images/s.gif" height="1" width="40" /></td>
<td valign="top">
<center>
<a id="up_5293602" onclick="return vote(this)" href="vote?for=5293602&amp;dir=up&amp;by=&amp;auth=">
<div class="up-arrow"></div>
View goban.js
function Goban(canvasElement) {
// size config
this.gridSize = 19;
this.gridWidth = 20;
// style config
this.styleStones = 'smooth';
this.styleBoard = 'lightwood';
// board style
View gist:4735211
PS D:\Dev\projects\john\bin> Measure-Command { .\debug\john.exe }
Days : 0
Hours : 0
Minutes : 0
Seconds : 0
Milliseconds : 600
Ticks : 6008259
TotalDays : 6.95400347222222E-06