Skip to content

Instantly share code, notes, and snippets.

asd
#!/usr/bin/ruby
require 'rubygems'
require 'sinatra'
get '/' do
"This is Sinatra"
end
@naquad
naquad / rc
Created October 12, 2011 21:17
for dir in [&viewdir, &directory]
if !isdirectory(dir)
call mkdir(dir)
endif
endfor
@naquad
naquad / rc
Created October 12, 2011 21:19
let g:gist_open_browser_after_post = 1
let g:gist_browser_command = 'echo %URL%'
let Tlist_Use_Right_Window=1
let Tlist_Use_Horiz_Window=0
let Tlist_Show_One_File=1
let Tlist_Compact_Format=1
let Tlist_Enable_Fold_Column=1
let Tlist_Auto_Update=1
# Converts the supplied options into the JSON needed for Apple's push notification servers.
# Extracts :alert, :badge, and :sound keys into the 'aps' hash, merges any other hash data
# into the root of the hash to encode and send to apple.
def packaged_message
opts = @options.clone # Don't destroy our pristine copy
hsh = {'aps' => {}}
hsh['aps']['alert'] = opts.delete(:alert).to_s if opts[:alert]
hsh['aps']['badge'] = opts.delete(:badge).to_i if opts[:badge]
if sound = opts.delete(:sound)
hsh['aps']['sound'] = sound.is_a?(TrueClass) ? 'default' : sound.to_s
ConnectionError ConnectionTCPClient::recv( int timeout )
{
m_recvMutex.lock();
if( m_cancel || m_socket < 0 )
{
m_recvMutex.unlock();
return ConnNotConnected;
}
value.gsu
xxxx'
xxxx'
xxxx'