i'm so proud that i decided to make a gist of it
grep -Frl "'user'" views | xargs sed -i .delete-me "s/\'user\'/\'quest-user\'/g"
// get qs from src path | |
// http://feather.elektrum.org/book/src.html | |
var scripts = document.getElementsByTagName('script'); | |
var thisIdx = scripts.length - 1; | |
var thisScript = scripts[thisIdx]; | |
var qs = {}; | |
var str = thisScript.src | |
.replace(/^[^\?]+\??/, '') // strip out address | |
.split(/\&/) // split on ampersands | |
.map(function(it){ // parse thru each key=val, split on equal sign and assign to qs object |
delete from tweets where timestamp < (NOW() - INTERVAL 6 MONTH) |
function parseDateString(str, options) { | |
var options = options || {} | |
, american = options.american_format | |
, local = options.local_time | |
, reg = {} | |
, sampleDate = new Date() | |
, y = 0, mo = 0, d = 0, h = 0, mi = 0, s = 0 | |
, days = [ | |
'mon', |
{ | |
"require": { | |
"sunra/php-simple-html-dom-parser": "1.5" | |
} | |
} |
i'm so proud that i decided to make a gist of it
grep -Frl "'user'" views | xargs sed -i .delete-me "s/\'user\'/\'quest-user\'/g"
<?php | |
function underline_to_camel_case($str) { | |
return lcfirst(implode("", array_map(function($e) { | |
return ucfirst($e); | |
}, explode("_", $str)) | |
) | |
); | |
} |
I hereby claim:
To claim this, I am signing this object:
require "yaml" | |
require "twitter" | |
require "net/http" | |
require "json" | |
config = YAML.load_file("config.yml"); | |
client = Twitter::REST::Client.new do |c| | |
c.consumer_key = config['consumer_key'] | |
c.consumer_secret = config['consumer_secret'] | |
c.access_token = config['access_token'] |
<?php | |
$process = proc_open( | |
'wc', // cmd to run | |
// define yr pipes | |
[ | |
['file', __FILE__, 'r'], // stdin (passing file to wc) | |
['file', 'output.txt' , 'w'] // stdout (output, we could also echo stream_get_contents of $pipes[1]) | |
], | |
// var to store the above | |
$pipes |
#!/usr/bin/env iojs | |
var path = require('path') | |
, fs = require('fs') | |
, jsonPath = path.join(__dirname, 'places.json') | |
, jobs = require(jsonPath) | |
, places = jobs.places | |
, spawn = require('child_process').spawn | |
, argv = require('minimist')(process.argv.slice(2)) | |
, prompt = require('prompt') |