✪ rqworker --db 10 default high
16:06:30 RQ worker started, version 0.3.7
16:06:30
16:06:30 *** Listening on default, high...
16:06:49 high: jobs.multiply(5, 2) (2df52ba2-bd32-4849-a8e1-c5241c78b542)
16:06:49 Job OK, result = 10
I hereby claim:
- I am jmhobbs on github.
- I am jmhobbs (https://keybase.io/jmhobbs) on keybase.
- I have a public key whose fingerprint is 5616 12FF A10D 9D7A 7FFB 75F4 F79C 72E6 EDC7 0E38
To claim this, I am signing this object:
This file contains 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 scratch | |
ADD main / | |
EXPOSE 8080 | |
CMD ["/main"] |
This file contains 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 -*- | |
BANK_FEE = 0.15 | |
COINBASE_PCT = 0.01 | |
def calculate_sale_profit(coins, price, purchase_cost): | |
value = round(coins * price, 2) | |
fee = BANK_FEE + round(value * COINBASE_PCT) | |
return (value - fee) - purchase_cost |
This file contains 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
TRANSMISSION_RPC_PASSWORD="set something here" | |
add-apt-repository -y ppa:transmissionbt/ppa | |
apt-get -y update | |
apt-get install -qy nginx transmission-cli transmission-daemon | |
ufw status | |
ufw allow 22 | |
ufw allow 443 | |
ufw allow 1194 |
This file contains 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/local/bin/python | |
import requests | |
import subprocess | |
# Configure Your Info Here | |
DOMAIN = "https://YOU.harvestapp.com" | |
USERNAME = "" | |
PASSWORD = "" | |
# / End Config |
This file contains 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
# Tracks when stuff is due. | |
# | |
# deadlines - List what you have due | |
# add deadline 2011-10-30 Thing - Add a deadline for October 10, 2011 | |
# remove deadline Thing - Remove a deadline named "Thing" | |
# clear deadlines - Remove all the deadlines | |
# | |
# Written by @jmhobbs | |
module.exports = (robot) -> |
I hereby claim:
- I am jmhobbs on github.
- I am jmhobbs (https://keybase.io/jmhobbs) on keybase.
- I have a public key whose fingerprint is D8E5 99E7 D1FF 62B0 9FD6 016C 2580 C0BE 34EB 9490
To claim this, I am signing this object:
This file contains 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
siblings = {1: 2, 2: 1, 3: 4, 4: 3, 5: 6, 6: 5} | |
cousins = set(siblings.keys()) | |
# Start by getting all the possible pairings for each person. | |
possible_pairings = {1: set(), 2: set(), 3: set(), 4: set(), 5: set(), 6: set()} | |
for i in cousins: | |
for j in cousins - set((i, siblings[i])): | |
possible_pairings[i].add(j) | |
combinations = [] |
This file contains 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 -*- | |
import sys | |
from flask import Flask, url_for | |
app = Flask(__name__) | |
@app.route("/") |