This file contains hidden or 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
io.sockets.on('connection', function(socket){ | |
console.log('client just connected'); | |
socket.emit('joined', {message:'client just connected'}); | |
socket.on('getCities', function(data, callback){ | |
console.log('getCities'); | |
callback([{name:'city 1'}, {name:'city 2'}]); | |
}); | |
}); |
This file contains hidden or 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(j,l){var g=typeof"",i=typeof undefined,c=typeof function(){},d=typeof{},h=function(o,n){return typeof o===n},a=function(n){return h(n,g)},e=function(n){return h(n,i)},b=function(n){return h(n,c)},m=function(n){return h(n,d)},k=function(n){return typeof HTMLElement==="object"?n instanceof HTMLElement:typeof n==="object"&&n.nodeType===1&&typeof n.nodeName==="string"},f=function(H){var E={MooTools:"$$",Prototype:"$$",jQuery:"*"},w=0,s="SCI-",x={},t=H||"simpleCart",J={},C={},u={},F=j.localStorage,B=j.console||{msgs:[],log:function(L){B.msgs.push(L)}},z="value",I="text",K="html",y="click",D={USD:{code:"USD",symbol:"$",name:"US Dollar"},AUD:{code:"AUD",symbol:"$",name:"Australian Dollar"},BRL:{code:"BRL",symbol:"R$",name:"Brazilian Real"},CAD:{code:"CAD",symbol:"$",name:"Canadian Dollar"},CZK:{code:"CZK",symbol:" Kč",name:"Czech Koruna",after:true},DKK:{code:"DKK",symbol:"DKK ",name:"Danish Krone"},EUR:{code:"EUR",symbol:"€",name:"Euro"},HKD:{code:"HKD",symbol:"$ |
This file contains hidden or 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
// by Marcus Zarra | |
#ifdef DEBUG | |
#define DLog(...) NSLog(@"%s %@", __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__]) | |
#define ALog(...) [[NSAssertionHandler currentHandler] handleFailureInFunction:[NSString stringWithCString:__PRETTY_FUNCTION__ encoding:NSUTF8StringEncoding] file:[NSString stringWithCString:__FILE__ encoding:NSUTF8StringEncoding] lineNumber:__LINE__ description:__VA_ARGS__] | |
#else | |
#define DLog(...) do { } while (0) | |
#ifndef NS_BLOCK_ASSERTIONS | |
#define NS_BLOCK_ASSERTIONS | |
#endif | |
#define ALog(...) NSLog(@"%s %@", __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__]) |
This file contains hidden or 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
require 'formula' | |
class Gsl < Formula | |
url 'http://ftp.gnu.org/gnu/gsl/gsl-1.14.tar.gz' | |
mirror 'http://ftpmirror.gnu.org/gsl/gsl-1.14.tar.gz' | |
homepage 'http://www.gnu.org/software/gsl/' | |
md5 'd55e7b141815412a072a3f0e12442042' | |
option :universal | |
def install |
This file contains hidden or 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
# encoding: UTF-8 | |
Encoding.default_internal = Encoding::UTF_8 | |
Encoding.default_external = Encoding::UTF_8 | |
require 'net/ftp' | |
require 'debugger' | |
require 'fileutils' | |
module Net | |
class FTP | |
def storbinary(cmd, file, blocksize, rest_offset = nil, &block) # :yield: data |
This file contains hidden or 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
useradd -d /home/user -s /bin/bash -m user | |
usermod -a -G group user |
This file contains hidden or 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
tell application "Growl" | |
-- Make a list of all the notification types | |
-- that this script will ever send: | |
set the allNotificationsList to {"iTunes Playing Track"} | |
-- Make a list of the notifications | |
-- that will be enabled by default. | |
-- Those not enabled by default can be enabled later | |
-- in the 'Applications' tab of the growl prefpane. | |
set the enabledNotificationsList to {"iTunes Playing Track"} | |
-- Register our script with growl. |
This file contains hidden or 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
NSData *archivedData = [NSKeyedArchiver archivedDataWithRootObject:originalView]; | |
UIView *viewCopy = [NSKeyedUnarchiver unarchiveObjectWithData:archivedData]; |
This file contains hidden or 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
svn status | grep "^?" | awk '{print $2}' | xargs -I {} svn add {}@ |
This file contains hidden or 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
// to fill a table you need to implement the protocol UITableViewDataSource in the Header and implement this //methods: | |
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView | |
{ | |
#warning Potentially incomplete method implementation. | |
// Return the number of sections. | |
return 0; | |
} | |
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section |