- Twitter: @emadb
- Website or Blog: http://ema.codiceplastico.com
- Company: Example Ltd. http://codiceplastico.com
This file contains 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 mouseup(evt) { | |
if (_isDD) { | |
return; | |
} | |
if (evt.shiftKey == true) { | |
var indexOf1 = this.cont.list.indexOf(_lastItemSelected); | |
var indexOf2 = this.cont.list.indexOf(this); | |
for (var i = indexOf2; i > indexOf1; i--) { | |
var item = this.cont.list[i]; |
This file contains 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
class BerlinClock | |
SECONDS = "Y" | |
HOURS_FIVES = "RRRR" | |
HOURS_ONES = "RRRR" | |
MINUTES_FIVES = "YYRYYRYYRYY" | |
MINUTES_ONES = "YYYY" | |
def initialize(h,m,s) | |
@h, @m, @s = h, m, s | |
end |
This file contains 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
{ | |
"commitId" : LUUID("556fb777-2cf3-e34d-9f34-88caad42c0be"), | |
"timestamp" : ISODate("2013-11-21T14:59:10.314Z"), | |
"aggregateId": "65dbab54-afd0-477b-a5fb-686cc90f7aff", | |
"events" : [ | |
{ | |
"eventName" : "item_added", | |
"args": ["1", "10"] | |
}, | |
{ |
This file contains 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
conn.beginTransaction( function( err ) { | |
//.. | |
}); | |
conn.queryRaw( "INSERT INTO test_txn (name) VALUES ('Anne')", function( err, results ) { | |
//.. | |
}); | |
conn.queryRaw( "INSERT INTO test_txn (name) VALUES ('Bob')", function( err, results ) { | |
//.. |
This file contains 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
public static class DynamicBinderExtensions | |
{ | |
public static dynamic DynaBind(this INancyModule module) | |
{ | |
return module.Bind<DynamicDictionary>(); | |
} | |
} |
This file contains 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
var async = require('async'); | |
var functions = []; | |
functions.push(function(){ console.log("1"); return test1(1); }); | |
functions.push(function(){ console.log("2"); return test1(2); }); | |
functions.push(function(){ console.log("3"); return test1(3); }); | |
async.parallel(functions, function(err, result){ | |
console.log('complete', result); |
This file contains 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
my_app = FbGraph::Application.new(ENV['app_id']); | |
acc_tok = my_app.get_access_token(ENV['token']); | |
group = FbGraph::Group.new('270489496319056', :access_token => acc_tok).fetch; | |
puts @group.to_yaml | |
#@group.feed.each{|e| puts e.to_yaml} | |
post = group.feed[0] |
NewerOlder