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
| # -*- coding: utf-8 -*- | |
| """ | |
| LICENSE: BSD (same as pandas) | |
| example use of pandas with oracle mysql postgresql sqlite | |
| - updated 9/18/2012 with better column name handling; couple of bug fixes. | |
| - used ~20 times for various ETL jobs. Mostly MySQL, but some Oracle. | |
| to do: | |
| save/restore index (how to check table existence? just do select count(*)?), | |
| finish odbc, |
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
| // Combine JS and CSS files | |
| // --- | |
| // | |
| // Make sure you install the npm dependencies | |
| // > cd YOUR_PROJECT_FOLDER | |
| // > npm install | |
| // | |
| // Than run: | |
| // > node build |
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 child_process = require('child_process'), | |
| assert = require('assert') | |
| var isChild = !!(process.send), | |
| isMaster = ((!isChild) && (process.argv.length > 2)), | |
| isTopLevel = (!isMaster && !isChild) | |
| if( isTopLevel ) { |
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
| import redis | |
| import threading | |
| class Listener(threading.Thread): | |
| def __init__(self, r, channels): | |
| threading.Thread.__init__(self) | |
| self.redis = r | |
| self.pubsub = self.redis.pubsub() | |
| self.pubsub.subscribe(channels) | |
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
| #!/usr/bin/env bash | |
| # intended use as alfred extension | |
| # if used otherwise take care of the {query} parameter string | |
| # | |
| # Edit paths for lefolder and | |
| # | |
| # at first, check if ~/Pictures/lescreenshots exists, if not create | |
| # grabs a screenshot or takes a existing image as input | |
| # |
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 'rubygems' | |
| require 'bundler/setup' | |
| require 'time' | |
| require 'date' | |
| require 'twitter' | |
| require 'fb_graph' | |
| require 'pp' | |
| require 'json' | |
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
| #!comment: This is a list of the top 100,000 most frequently-used English words | |
| #!comment: according to Wiktionary. | |
| #!comment: | |
| #!comment: It was compiled in August 2005 and coalesced into a handy list for | |
| #!comment: use in John the Ripper. | |
| #!comment: | |
| #!comment: | |
| #!comment: Pull date: Sun Jan 15 22:03:54 2012 GMT | |
| #!comment: | |
| #!comment: Sources: |
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
| # Credit http://stackoverflow.com/a/2514279 | |
| for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r |
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 | |
| /** | |
| * Extends Twig with | |
| * {{ "my string, whatever" | pre }} --> wraps with <pre> | |
| * {{ myBigVar | yaml_dump | pre }} as {{ myBigVar | ydump }} or {{ myBigVar | dumpy }} | |
| * {{ myBigVar | var_dump | pre }} as {{ myBigVar | dump }} | |
| * | |
| * You may control the depth of recursion with a parameter, say foo = array('a'=>array('b'=>array('c','d'))) | |
| * |
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 fs = require("fs") | |
| var ssl_options = { | |
| key: fs.readFileSync('privatekey.pem'), | |
| cert: fs.readFileSync('certificate.pem') | |
| }; | |
| var port = process.env.PORT || 3000; | |
| var express = require('express'); | |
| var ejs = require('ejs'); | |
| var passport = require('passport') |