🍩
- GitHub Staff
- https://abrah.am
- @abraham@indieweb.social
This file contains hidden or 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
| /* | |
| natcompare.js -- Perform 'natural order' comparisons of strings in JavaScript. | |
| Copyright (C) 2005 by SCK-CEN (Belgian Nucleair Research Centre) | |
| Written by Kristof Coomans <kristof[dot]coomans[at]sckcen[dot]be> | |
| Based on the Java version by Pierre-Luc Paour, of which this is more or less a straight conversion. | |
| Copyright (C) 2003 by Pierre-Luc Paour <natorder@paour.com> | |
| The Java version was based on the C version by Martin Pool. | |
| Copyright (C) 2000 by Martin Pool <mbp@humbug.org.au> |
This file contains hidden or 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
| { | |
| "verb": "post", | |
| "postedTime": "2010-10-21T20:57:32+00:00", | |
| "inReplyTo": { | |
| "link": "http://twitter.com/gilesgoatboy/statuses/28056868330" | |
| }, | |
| "body": "@gilesgoatboy Sadly my latin is mostly read only. Nescio latinam bene. (google translate is not half bad at conjugating btw)", | |
| "actor": { | |
| "location": { | |
| "displayName": "Boulder, CO", |
This file contains hidden or 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
| CLI: | |
| homebrew | |
| git | |
| rvm | |
| ruby 1.9.x | |
| rails 3.x | |
| googlecl | |
| irssi | |
| readline | |
| unrar |
This file contains hidden or 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
| require 'fileutils' | |
| start_time = Time.now | |
| SOURCE_DB = { | |
| :name => 'db_name', | |
| :user => 'db_user', | |
| :password => 'db_pass', | |
| :host => 'localhost' |
This file contains hidden or 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
| <? | |
| /* | |
| * This example would probably work best if you're using | |
| * an MVC framework, but it can be used standalone as well. | |
| * | |
| * This example also assumes you are using Predis, the excellent | |
| * PHP Redis library available here: | |
| * https://github.com/nrk/predis | |
| */ |
This file contains hidden or 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
| $('h1').bind('click', function() { | |
| this.log('clicked!'); | |
| }, console); | |
| $('h2').bind('click', {msg: 'clicked!'}, function(e) { | |
| this.log(e.data.msg); | |
| }, console); |
This file contains hidden or 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
| Twas the night before launch, when all through the server | |
| Not a process was stirring, not even a crawler; | |
| The init scripts were stored in rc.d, | |
| In hopes that the sys admin soon would be free; | |
| The Damon was nestled all snug in his bed, | |
| While visions of multi-tenant architecture danced in his head; | |
| And nginx all configured, and cap deploy at the ready, |
This file contains hidden or 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 Parser = require('./jsonparse'); | |
| var Http = require('http'); | |
| var p = new Parser(); | |
| // IMPORTANT, put your username and password in here | |
| var username = "yourTwitterUsername", password = "yourPassword"; | |
| var client = Http.createClient(80, "stream.twitter.com"); | |
| var request = client.request("GET", "/1/statuses/sample.json", { | |
| "Host": "stream.twitter.com", | |
| "Authorization": (new Buffer(username + ":" + password)).toString("base64") | |
| }); |
This file contains hidden or 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
| // Scraping Made Easy with jQuery and SelectorGadget | |
| // (http://blog.dtrejo.com/scraping-made-easy-with-jquery-and-selectorga) | |
| // by David Trejo | |
| // | |
| // Install node.js and npm: | |
| // http://joyeur.com/2010/12/10/installing-node-and-npm/ | |
| // Then run | |
| // npm install jsdom jquery http-agent | |
| // node numresults.js | |
| // |
This file contains hidden or 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
| <script type="text/javascript"> | |
| (function() { | |
| if (window.__twitterIntentHandler) return; | |
| var intentRegex = /twitter\.com(\:\d{2,4})?\/intent\/(\w+)/, | |
| windowOptions = 'scrollbars=yes,resizable=yes,toolbar=no,location=yes', | |
| width = 550, | |
| height = 420, | |
| winHeight = screen.height, | |
| winWidth = screen.width; |