Skip to content

Instantly share code, notes, and snippets.

14/12/14 15:32:13 INFO hadoop.FlowMapper: sinking to: Hfs["TextDelimited[['accept_language', 'browser', 'browser_height', 'browser_width', 'c_color', 'campaign', 'channel', 'click_action', 'click_action_type', 'click_context', 'click_context_type', 'click_sourceid', 'click_tag', 'code_ver', 'color', 'connection_type', 'cookies', 'country', 'ct_connect_type', 'curr_factor', 'curr_rate', 'currency', 'cust_hit_time_gmt', 'cust_visid', 'daily_visitor', 'date_time', 'domain', 'duplicate_events', 'duplicate_purchase', 'duplicated_from', 'evar1', 'evar10', 'evar11', 'evar12', 'evar13', 'evar14', 'evar15', 'evar16', 'evar17', 'evar18', 'evar19', 'evar2', 'evar20', 'evar21', 'evar22', 'evar23', 'evar24', 'evar25', 'evar26', 'evar27', 'evar28', 'evar29', 'evar3', 'evar30', 'evar31', 'evar32', 'evar33', 'evar34', 'evar35', 'evar36', 'evar37', 'evar38', 'evar39', 'evar4', 'evar40', 'evar41', 'evar42', 'evar43', 'evar44', 'evar45', 'evar46', 'evar47', 'evar48', 'evar49', 'evar5', 'evar50', 'evar51', 'evar52', 'evar53', 'e
#!/usr/bin/env sh
# Stored at: https://gist.github.com/4452136
# Assumes the given path points to a FLV file with MP4 video.
# Use ffmpeg to repackage the file.
ffmpeg -i "$1" -acodec copy -vcodec copy "$1".mp4
# old version:
# Not used anymore as VLC seems to have a bug that creates broken
for k,v in myDict:
whatever.put_item(data={
k:v,
})
@crankyadmin
crankyadmin / README.md
Created June 27, 2014 12:57
1000 lines

README is empty

@crankyadmin
crankyadmin / README.md
Created June 27, 2014 12:57
1000 lines

README is empty

@crankyadmin
crankyadmin / README.md
Created June 27, 2014 12:33
1000 lines

README is empty

README is empty

Flask + uWSGI + nginx Primer

I've been having trouble with serving a Flask app via uWSGI and nginx, so I thought I'd put together some of the basics to help out others.

How this shit works

  • Flask is managed by uWSGI.
  • uWSGI talks to nginx.
def my_func():
return "embedding?"
#!/usr/sbin/dtrace -s
#pragma D option quiet
#pragma D option switchrate=10hz
inline int af_inet = 2; /* AF_INET defined in bsd/sys/socket.h */
inline int af_inet6 = 30; /* AF_INET6 defined in bsd/sys/socket.h */
dtrace:::BEGIN
{