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
{"foo":"bar"} |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" | |
<html> | |
<body> | |
<h1>hello, david</h1> | |
</body> | |
</html> |
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
# Use GitHub in some way | |
# Use MongoDB in same way | |
# Use Git in some way | |
# Use EC2 in some way | |
# Use Rackspace in some way. | |
# Idea - hosting platform for apps. | |
# Idea - create and push an app in ten minutes. Like, make an app really quickly. | |
Like, what if you included a PHP file (lib.php) and could start making calls immediately. So we don't just provide library code => we actually provide the compute. |
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
def inside_circle(p1, p2): | |
# Return true if p1,p2 is contained within the unit cirle | |
return 0.5 > (((0.5 - p1) ** 2 + (0.5 - p2) ** 2) ** 0.5) | |
def appx_pi(): | |
inside = 0 | |
total = 0 | |
while True: | |
p1 = random.random() |
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 getName(callback) { | |
client.select('name from people', function(err, result) { | |
if (err) { | |
callback(err); | |
return; | |
} else { | |
// process 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
[ | |
{ | |
"uid": "jhuttner", | |
"owner": "jhuttner", | |
"directories": ["/usr/local/adnxs"] | |
}, | |
{ | |
"uid": "jhuttner-personal", | |
"owner": "jhuttner", | |
"directories": ["/home/jhuttner/git-repos"] |
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 alerter(start, finish) { | |
for (var i=0; i<=5; i++) { | |
setTimeout(function() { | |
alert(i); | |
}, i*1000) | |
} | |
} |
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
if (!items_by_name[name]) { | |
items_by_name[name] = []; | |
} | |
items_by_name[name].push(item); | |
// could we do something like this? | |
items_by_name[name].smart_push(item, []) |
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 add_to_list = false; | |
var result = []; | |
$.each(checks, function(check) { | |
// don't go through all the logic if we know we are going to append it | |
if (add_to_list) { | |
return true; | |
} | |
if (check()) { | |
addToList = true; |
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
<?php | |
function splitArray($array) { | |
$array = $this->quoteArray($array); | |
$fields = array_keys($array); | |
$fields_with_ticks = array(); | |
foreach($fields as $f) { | |
$fields_with_ticks[] = '`'.$f.'`'; | |
} | |
$values = array_values($array); |