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
// See https://en.wikipedia.org/wiki/Damm_algorithm | |
// =DAMM(5724) == true | |
const cols = { | |
"0": { | |
"0": "0", | |
"1": "7", | |
"2": "4", | |
"3": "1", | |
"4": "6", |
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
sudo apt-get update | |
sudo apt-get install build-essential libssl-dev libffi-dev python-dev python-pip libsasl2-dev libldap2-dev | |
sudo apt-get install build-essential libssl-dev libffi-dev python3.6-dev python-pip libsasl2-dev libldap2-dev | |
pip install virtualenv | |
sudo apt install python3-venv | |
pyvenv venv | |
source venv/bin/activate | |
pip install --upgrade setuptools pip | |
pip install superset | |
pip install psycopg2 |
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
"use latest"; | |
import jwt from 'jsonwebtoken'; | |
export default function(ctx, cb) { | |
const authSecret = ctx.data.AUTH0_CLIENT_SECRET; | |
const streamSecret = ctx.data.STREAM_CLIENT_SECRET; | |
const token = ctx.data.token; | |
const userId = jwt.verify(token, new Buffer(authSecret, 'base64')).sub; | |
const slug = ctx.data.feed; | |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Insecure Login</title> | |
</head> |
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
# uses https://github.com/josegonzalez/python-github-backup | |
github-backup -o ff-backup -p "API token" -u shauns --all -P -R "ff-docs" Freeformers |
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
[eb ssh] | |
source /opt/python/run/venv/bin/activate | |
source /opt/python/current/env | |
cd /opt/python/current/app | |
./manage.py help |
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
qrencode -o - 1234eabcdf | imgcat |
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
import requests | |
# Needs create:users scope, https://auth0.com/docs/api/management/v2#!/Users/post_users | |
headers = {'Authorization': 'Bearer qwertyuiop'} | |
body = {'connection': 'Username-Password-Authentication', 'email': u'[email protected]', 'family_name': 'Bloggs', 'given_name': 'Joe', 'password': 'secrets'} | |
res = requests.post('https://freeformers.auth0.com/api/v2/users', json=body, headers=headers) | |
res.json() |
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 slacker import Slacker | |
import itertools | |
slack = Slacker('<API TOKEN>') | |
pages = slack.files.list(page=1).body['paging']['pages'] | |
all_the_files = list(itertools.chain(*[slack.files.list(page=i).body['files'] for i in range(1,pages + 1)])) | |
biggest_first = sorted(all_the_files, key=lambda f: f['size'], reverse=True) |
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
<script src='https://www.workable.com/assets/embed.js' type='text/javascript'></script> | |
<script type='text/javascript' charset='utf-8'> | |
whr(document).ready(function(){ | |
whr_embed(116603, {detail: 'titles', base: 'jobs', zoom: 'country', grouping: 'none'}); | |
}); | |
</script> | |
<div id="whr_embed_hook"></div> |
NewerOlder