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 _ = require('lodash'); | |
function deprecated () { | |
var args = Array.prototype.slice.call(arguments), | |
func = args.shift(); | |
console.log('[Deprecated] ' + func.name) | |
return func.apply(func, args); | |
} | |
var myFunction = _.wrap(myFunction, deprecated); |
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
from collections import defaultdict | |
lost = defaultdict(int) | |
# df is a dataframe | |
for d in df.iterrows(): | |
if d['settle_bet'] == 'Nan': | |
lost[d['game_account_id']] += 1 |
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
(function ($) { | |
$.fn.toggle = function (options) { | |
var settings = $.extend({}, options); | |
$(this).hide(); | |
return this.each(function () { | |
var $node = $(this), | |
id = $node.data('action'), | |
state = $node.data('state'), |
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
body { | |
font-family: Helvetica; | |
} | |
.controls { | |
margin-bottom: 20px; | |
} | |
.square { | |
position: relative; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<style> | |
.underlay { | |
fill: #ababab; | |
} | |
.line { |
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
#!/bin/bash | |
GITROOT=`git rev-parse --show-toplevel` | |
NAME=`basename $GITROOT` | |
s3cmd ls | cut -d ' ' -f 4 | sed -e 's/s3:\/\///g' | grep $NAME || s3cmd mb s3://$NAME | |
echo "Deploying $NAME..." | |
s3cmd sync --no-preserve --delete-removed --skip-existing --rexclude='.git/' $GITROOT s3://$NAME |
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
(function () { | |
window._benbot = window._benbot || {}; | |
var config = { | |
method: window._benbot.method || 100, | |
submission: window._benbot.submission || false, | |
diff: window._benbot.diff || 20 | |
}; | |
function r (n) { n = n || 35; return Math.floor(Math.random() * n) } | |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<link rel="stylesheet" href="//s3.amazonaws.com/punchtab-static/zzzzzz/css/punchdation.5.css"> | |
</head> | |
<body> | |
<div class="row" data-equalizer> | |
<div class="large-6 columns panel" data-equalizer-watch> |
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
u'Received: by mx-006.sjc1.sendgrid.net with SMTP id XavmtSzKqd Wed, 06 Aug 2014 20:05:28 +0000 (GMT)\nReceived: from mail-ie0-f178.google.com (mail-ie0-f178.google.com [209.85.223.178]) by mx-006.sjc1.sendgrid.net (Postfix) with ESMTPS id B2C6381FDC for <[email protected]>; Wed, 6 Aug 2014 20:05:28 +0000 (GMT)\nReceived: by mail-ie0-f178.google.com with SMTP id rd18so3388978iec.23 for <[email protected]>; Wed, 06 Aug 2014 13:05:28 -0700 (PDT)\nX-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=cR8c9pr17VRTqA4R2MlZW73a0vI83abBhHAZ60OApFg=; b=a/AEIMhisqVlpNnO3XCoPD4HdBuQ+zyro+MKAQWplSQHHdqrLBc4yw3Qk3GRG0ea/2 vrks2QmQVrrmbHXwZ1yoOU9SKM6lZ8GOxnQfgZaW2tmsdixv3WneRjrjcg07Hzlm3cs6 nNPBJvqP5tu3hpFKIegIq1JHEkq9UUhB3uV0weVsqsA6WvxnSsF+N48d67aaQuyboKOY /1uhsg6wL+8fkuhl0woius+i3vh7tGt0wspPFNANdEPn+/TyuXVWxrMJslWGNrN7D2j3 +VcTpKWpRpnfv9RbyqqIO0gnyESZ2k3y/hbvXYd237NpkEa9In49BQ48OD9GOhd0VUa |
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
#!/bin/sh -e | |
# | |
# Usage: browser | |
# pipe html to a browser | |
# e.g. | |
# $ echo '<h1>hi mom!</h1>' | browser | |
# $ ron -5 man/rip.5.ron | browser | |
if [ -t 0 ]; then | |
if [ -n "$1" ]; then |