Skip to content

Instantly share code, notes, and snippets.

[2019-04-01 18:19:11,856] {{settings.py:174}} INFO - settings.configure_orm(): Using pool settings. pool_size=5, pool_recycle=1800, pid=48
/usr/local/airflow/.local/lib/python3.6/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
""")
[2019-04-01 18:19:12,912] {{__init__.py:51}} INFO - Using executor LocalExecutor
DB: postgresql+psycopg2://airflow:***@postgres:5432/airflow
[2019-04-01 18:19:13,083] {{db.py:338}} INFO - Creating tables
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
/usr/local/lib/python3.6/site-packages/airflow/operators/bash_operator.py:66: PendingDeprecationWarning: Invalid arguments were passed to BashOperator (task_id: log_cleanup_file_0). Support for passing such argumen

Keybase proof

I hereby claim:

  • I am thegreatape on github.
  • I am thomasmayfield (https://keybase.io/thomasmayfield) on keybase.
  • I have a public key whose fingerprint is FF9A 1348 A46A 313D 5567 9D9E BD49 9CA7 62B0 30BF

To claim this, I am signing this object:

@thegreatape
thegreatape / gist:d55a551317a0579f0dbf
Last active August 29, 2015 14:12
Conditioning Workouts!

I do most of my conditioning these days with kettlebells, either doing complexes or just timed sets of swings. Currently, I'm mostly doing: 15 seconds swings / 15 seconds rest Work up to 10 minutes of that, then start mixing in a heavier bell one set at a time until the heavier bell replaces the lighter one for all sets. Then repeat.

Barbell/kettlebell complexes can be endlessly varied: http://70sbig.com/blog/2014/11/chalk-talk-11-barbell-complex/

Or, just burpees. You can do descending sets: 10, 9, 8, 7 ... 1, with a fixed 30-60 second rest in between. If you want to really hate life, superset the burpees with dumbell/kettlebell swings or snatches.

Dan John's "The Eagle": from http://danjohn.net/2011/06/the-four-steps/

@thegreatape
thegreatape / gist:f2a4877bff4e242b3e87
Created August 16, 2014 18:59
Parentheses per line in Ring vs Express.js
$ wc -l ring/**/*.clj
5418 total
$ fgrep -o "(" ring/**/*.clj | wc -l
3790
$ wc -l express/**/*.js
14745 total
$ fgrep -o "(" express/**/*.js | wc -l
9528
@thegreatape
thegreatape / $'.js
Created February 12, 2011 22:01
Replacing with literal $' expressions in JS regexes.
// returns "ab"
"abc".replace(/c/, "$'")
// returns "ab$'"
"abc".replace(/c/, function(){ return "$'";})
var pcap = require('pcap');
var session1 = pcap.createSession('en0', "ip proto \\tcp", (10 * 1024 * 1024));
session1.on('packet', function(packet){
console.log('session 1 packet');
});
session1.removeAllListeners();
session1.close();
var session2 = pcap.createSession('en0', "ip proto \\tcp", (10 * 1024 * 1024));
var httpProxy = require('http-proxy'),
http = require('http');
httpProxy.createServer(9002, 'localhost').listen(9001);
http.createServer(function(req, res){
res.writeHead(200, {'Content-Type': 'text/plain'});
res.write('content!');
res.end();
}).listen(9002);
var foo = 'bar';
var a = function(){
console.log(foo);
}
var b = function(){
console.log(foo);
var foo = 'blarg';
}
a()
var sys = require('sys');
var libxmljs = require('libxmljs');
var xml = "<test>\n <![CDATA[My god, it's full of segfaults!]]>\n</test>";
var doc = libxmljs.parseXmlString(xml);
var node = doc.get('//test');
var children = node.childNodes();
for (var i in children) {
sys.debug(i);
sys.debug(children[i]);