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
diff --git a/pagify.js b/pagify.js | |
index 051f1ce..577d798 100644 | |
--- a/pagify.js | |
+++ b/pagify.js | |
@@ -23,7 +23,10 @@ | |
// Run after loading if caching, otherwise run immediately | |
var runAfterLoading = function() { | |
self.switchPage = function(page) { | |
- page = page || window.location.hash.replace('#',''); | |
+ if(!page){ //if there's no page selected, go back to the default |
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
<?php | |
//I'd add a shebang line but my php is /usr/local/zend/... and yours probably isn't | |
//if you want to run it that way, make sure to offset the argv keys by -1 | |
//explain usage | |
if( !isset( $argv[1] ) ){ | |
echo "Describes all tables in the nice mysql c client way\n"; | |
echo "Usage: php " . basename(__FILE__) . " [username] [password] [database]"; | |
die("\n"); | |
} |
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
<?php | |
//explain usage | |
if( !isset( $argv[1] ) ){ | |
echo "Usage: php " . basename(__FILE__) . " [url]"; | |
die("\n"); | |
} | |
$languages = array( 'python'=>0, 'php'=>0, 'node'=>0, 'ruby'=>0, 'java'=>0, 'javascript'=>0 ); | |
$length = count( $languages ); | |
$url = $argv[1]; |
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
function jpgto(){ | |
local jptkeyword=$1; | |
local jptpath=$2; | |
curl -silent -F keyword=$jptkeyword -F file="@$jptpath" jpg.to/finish.php >> /dev/null; | |
echo "http://jpg.to/$jptkeyword"; | |
} | |
[you@home]$ jpgto delicious /path/to/cake.jpg |
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 Afonigizer = require('../afonigizer.js').Afonigizer; | |
var _ = require('../node_modules/underscore/underscore.js'); | |
describe("The Afonigizer", function(){ | |
'use strict'; | |
var afonigizer, i; | |
beforeEach(function(){ | |
afonigizer = new Afonigizer(Math); |
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
//you must be viewing from the overlay view (the inline-page view changes page on next-click) | |
// 1. run in console | |
// 2. copy links from console when it's done | |
// 3. paste into imgur.com or whatevs | |
var imagesArray = []; | |
var repeatClickLog; | |
var logAndClick = function(){ | |
if(document.querySelector('.videoStage').childNodes.length){ |
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
// ==UserScript== | |
// @name Keep the page open | |
// @namespace http://use.i.E.your.homepage/ | |
// @version 0.1 | |
// @description enter something useful | |
// @match https://ssp.ptc.com/jira/* | |
// @copyright 2012+, You | |
// ==/UserScript== | |
setInterval(function(){ |
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
/**********************************************/ | |
/* | |
/* IR_Black Skin by Ben Truyman - 2011 | |
/* | |
/* Based on Todd Werth's IR_Black: | |
/* http://blog.toddwerth.com/entries/2 | |
/* | |
/* Inspired by Darcy Clarke's blog post: | |
/* http://darcyclarke.me/design/skin-your-chrome-inspector/ | |
/* |
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
[523]$ mongo asdf | |
MongoDB shell version: 2.0.4 | |
connecting to: asdf | |
> db.a.insert({a:1}); | |
> | |
bye | |
17:42:36-diamonds:wk2 | |
[524]$ sudo du -sh /var/lib/mongodb/asdf. | |
asdf.0 asdf.1 asdf.ns | |
17:42:36-diamonds:wk2 |
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
h2.Code | |
```javascript | |
var fs = require('fs'); | |
var filename = process.argv[2]; | |
var fileBuffer = fs.readFileSync(filename); | |
//get # of lines in `contents` Buffer | |
var lines = fileBuffer.toString().split("\n"); | |
lines.forEach(function(line,index){//remove \r's | |
lines[index] = line.replace(/\r/,''); |
OlderNewer