Skip to content

Instantly share code, notes, and snippets.

View imsickofmaps's full-sized avatar

Mike Jones imsickofmaps

View GitHub Profile
@criccomini
criccomini / airflow.cfg
Created June 22, 2016 15:09
airflow.cfg
# A redacted version of airflow.cfg
[core]
airflow_home = /etc/airflow
dags_folder = /etc/airflow/dags
base_log_folder = /var/log/airflow
s3_log_folder = None
remote_base_log_folder = gs://some-bucket
remote_log_conn_id = gcp_di
executor = LocalExecutor
@criccomini
criccomini / airflow-supervisord.conf
Created June 22, 2016 14:54
airflow-supervisord.conf
; Configuration for Airflow webserver and scheduler in Supervisor
[program:airflow]
command=/bin/airflow webserver
stopsignal=QUIT
stopasgroup=true
user=airflow
stdout_logfile=/var/log/airflow/airflow-stdout.log
stderr_logfile=/var/log/airflow/airflow-stderr.log
environment=HOME="/home/airflow",AIRFLOW_HOME="/etc/airflow",TMPDIR="/storage/airflow_tmp"
#!/usr/bin/env python
from HTMLParser import HTMLParser
from urlparse import urlparse
import requests
MC2_URL = 'http://mc2.infr.controller.seed-stack.local'
@rririanto
rririanto / pypdf_to_image.py
Last active June 16, 2020 06:23
Python Convert PDF to Image
"""
Problem:
How to Convert PDF to Image with Python Script ?
Installation:
I use ubuntu OS 14.04
We use wrapper for ImageMagick [http://www.imagemagick.org/script/index.php] to Convert The PDF file
in Python do:
$ sudo apt-get install libmagickwand-dev
@lambdahands
lambdahands / _readme.md
Created September 28, 2015 17:09
FlowType and CSS Modules

Huh?

So basically FlowType doesn't know about CSS Modules, a really handy way of dealing with the plagues of CSS in codebases (global variables and dependency wackiness mainly).

What WebPack allows us to do is "require" CSS files and use their class names:

import styles from "my_styles.css";
import React from "react";
@hodgestar
hodgestar / gff
Created March 3, 2015 09:49
Git Flow Feature helper script.
#!/bin/bash
CMD="$1"
shift 1
function get_feature () {
FEATURE=`git flow feature | grep '^\* ' | sed 's/^\* //'`
ISSUE=`echo "$FEATURE" | sed -e 's/issue-\([0-9]*\)-.*/\1/'`
echo "Feature: $FEATURE (issue: $ISSUE)"
}
@jerith
jerith / gist:865fafea21ac0298bb4d
Created September 25, 2014 12:58
Releasing a Python thing
# You'll need these to release stuff.
pip install wheel twine
# Versioning and merging.
./utils/bump-version.sh <version>
git commit -m 'Release version <version>.'
git push origin develop
git checkout master
git merge --ff develop
git tag besnappy-<version>
var _ = require('lodash');
var vumigo = require('vumigo_v02');
var App = vumigo.App;
var Choice = vumigo.states.Choice;
var ChoiceState = vumigo.states.ChoiceState;
var FreeText = vumigo.states.FreeText;
var EndState = vumigo.states.EndState;
var Event = vumigo.events.Event;
var BaseApp = App.extend(function(self) {
App.call(self, 'states:start');
self.states.add('states:start', function(name) {
// a bit of a yucky way of doing events, wish we opted for a more
// nodejs like approach (.emit('foo', {bar: 'baz'}))
// .emit returns a promise
@staltz
staltz / introrx.md
Last active May 24, 2024 07:56
The introduction to Reactive Programming you've been missing