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()); | |
}); |
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
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
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
/** | |
* 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
<?php | |
/** | |
* Could also look at parsing shapefiles manually: http://en.wikipedia.org/wiki/Shapefile#Shapefile_shape_format_.28.shp.29 | |
*/ | |
class wktFromZip { | |
function __construct($fid) { | |
// Extract zip file to tmp. | |
$file = file_load($fid); |
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 | |
/** | |
* Simple custom text box. | |
*/ | |
class multilingual_box extends boxes_box { | |
/** | |
* Implementation of boxes_content::options_defaults(). | |
*/ | |
public function options_defaults() { |
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 JSLint validator for Textmate: | |
1. Install node and npm | |
2. Install jslint module: npm install -g jslint | |
3. Create a new command named jslint for Javascript in the Bundle Editor | |
- Input: 'Entire Document' | |
- Output: 'Show as Tool Tip' | |
- Activation: Key Equivalent, something like Command+j | |
- Command(s), probably have to change your node path: |
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 | |
if (!isset($_COOKIE['mailed'])) { | |
$to = '[email protected]'; | |
$subject = 'QR code was used!'; | |
$body = print_r($_SERVER, true); | |
if (mail($to, $subject, $body)) { | |
setcookie("mailed", 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
true - How about a big round of applause for Mr. Dwight Schrute. This is huge. | |
true - Come on, let's gangbang this thing and go home. | |
true - Hold it in your mouth if you can't swallow. | |
true - It was easy to get in but impossible to rise up. | |
false - And you were directly under her the entire time? | |
true - Come again. | |
true - I need two men on this. | |
false - You're hardly my first. | |
true - The thought of popping one of your beets into my mouth makes me want to vomit. | |
true - Does the skin look red and swollen. |
OlderNewer