Skip to content

Instantly share code, notes, and snippets.

/*
===============================================================================
Name : TestSleep.c
Author : $(author)
Version :
Copyright : $(copyright)
Description : main definition
===============================================================================
*/
@akimasa
akimasa / gist:156f306dd9076e24fc01
Last active September 15, 2018 09:56
Bash completion for irsend (experimental)
ircomp1 (){
local list1
list1=$(irsend list '' '' 2> >(sed 's/irsend: //g'))
case "$COMP_CWORD" in
1 )
COMPREPLY=( $(compgen -W "send_once send_start send_stop list set_transmitters simulate" $2) );;
2 )
COMPREPLY=( $(compgen -W "$list1" $2) );;
3 )
COMPREPLY=( $(compgen -W "$(irsend list "$3" '' 2> >(cut -f1 -d " ") | cut -f2 -d ' ')" $2) );;
RewriteEngine On
RewriteCond %{QUERY_STRING} transport=polling
RewriteRule /(.*)$ http://localhost:3000/$1 [P]
ProxyRequests off
ProxyPass /socket.io/socket.io.js http://localhost:3000/socket.io/socket.io.js
ProxyPassReverse /socket.io/socket.io.js http://localhost:3000/socket.io/socket.io.js
ProxyPass /socket.io/ ws://localhost:3000/socket.io/
ProxyPassReverse /socket.io/ ws://localhost:3000/socket.io/
@akimasa
akimasa / gist:5840717
Last active December 18, 2015 20:29
EpisoPassのパスワードの候補を全部コンソールに吐き出すコード。 使うときは パスワード生成ページを保存して、最後の方の</script>前に投入
console.log($("#pass").val());
ansmax = [];
answer = [];
for(j=0;data.qas.length>j;j++){
ansmax[j]= data.qas[j].answers.length-1;
answer[j]=0;
}
outer:
for(;;){