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
/* Full length pages, remove fancy scroll bar, and add clearfix */ | |
#Faux:after, | |
.Faux:after, | |
#FauxInside:after, | |
.FauxInside:after, | |
#Main:after { | |
content: "."; | |
display: block; | |
clear: both; | |
visibility: hidden; |
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
Map { | |
background-color: #b8dee6; | |
} | |
#countries { | |
::outline { | |
line-color: #85c5d3; | |
line-width: 2; | |
line-join: round; | |
} |
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 fs = require('fs'); | |
var csv = require('csv'); | |
var data = fs.readFileSync('all_reports.json', 'utf8'); | |
var lines = data.split("\n"); | |
var all = []; | |
for (var i = 0; i < lines.length; i++) { | |
console.log(i); | |
var items = JSON.parse(lines[i]).items; |
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 word frequency analysis of the Facebook IPO filing document found here: http://www.sec.gov/Archives/edgar/data/1326801/000119312512034517/d287954ds1.htm | |
Using command from: https://josephhall.org/nqb2/index.php/word_frequency | |
$ tr '[A-Z]' '[a-z]' < facebook_ipo.txt | tr -cd '[A-Za-z0-9_ \012]' | tr -s '[ ]' '\012' | sort | uniq -c | sort -nr | |
Or copy passage to clipboard and paste to command line: | |
$ pbpaste | tr '[A-Z]' '[a-z]' | tr -cd '[A-Za-z0-9_ \012]' | tr -s '[ ]' '\012' | sort | uniq -c | sort -nr |
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
{ | |
"author": "tylor", | |
"name": "csv_street_trees", | |
"version": "0.0.0", | |
"repository": { | |
"url": "" | |
}, | |
"main": "trees.js", | |
"engines": { | |
"node": "~v0.4.9" |
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. |
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
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 | |
/** | |
* 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
<?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); |