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
/** | |
* Quick and dirty snippet to log bus information provided by Translink mobile pages like: http://nb.translink.ca/StopMap/50322 | |
* Run using: $ node gather.js > log.js | |
*/ | |
var exec = require('child_process').exec; | |
var last; | |
// Grab the ASP.NET_SessionId from a browser cookie. | |
var session = '...'; |
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
diff --git plugins/searchlight_graphael_box.inc plugins/searchlight_graphael_box.inc | |
index 60116c1..34394c9 100644 | |
--- plugins/searchlight_graphael_box.inc | |
+++ plugins/searchlight_graphael_box.inc | |
@@ -30,6 +30,7 @@ class searchlight_graphael_box extends boxes_box { | |
'#options' => array( | |
'pie' => t('Pie'), | |
'bar' => t('Bar'), | |
+ 'hbar' => t('Horizontal Bar'), | |
'line' => t('Line'), |
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
71579 photos * (2592 * 1944 px) * (2.4 inches/sqrt(240^2 + 320^2)) = 2164054206 inches = 54967 km = 1.4 times around the Earth | |
Number of public Flickr photos * Nokia N82 camera resolution * Nokia N82 screen pixel density | |
So, if you were to line up the pixels from Roland's camera next to each other and display them on a Nokia N82 screen, they would circle the Earth 1.4 times. |
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
Ruby bitwise swap: | |
a = 10 | |
b = 3 | |
print (a ^ b ^ a), "\n" # 3 | |
print (b ^ a ^ b), "\n" # 10 | |
PHP bitwise swap: |
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 XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> | |
<head> | |
<title>Plaintext Passwords</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
$('#password').keyup(function() { | |
$('#plaintext').text($('#password').val()); | |
}); |
NewerOlder