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/bin/env python | |
# | |
# Converts any integer into a base [BASE] number. I have chosen 62 | |
# as it is meant to represent the integers using all the alphanumeric | |
# characters, [no special characters] = {0..9}, {A..Z}, {a..z} | |
# | |
# I plan on using this to shorten the representation of possibly long ids, | |
# a la url shortenters | |
# |
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
.arrowgasm(@position: top, @size : "4px", @background-color : #88b7d5, @border-width: "2px", @border-color : #c2e1f5, @arrowClass : "arrow_box"){ | |
(~".@{arrowClass}") { | |
position: relative; | |
background: @background-color; | |
border: @size solid @border-color; | |
} | |
(~".@{arrowClass}:after"), (~".@{arrowClass}:before") { | |
bottom: 100%; | |
border: solid transparent; |
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
#!/bin/bash | |
# This script zeroes out any space not needed for packaging a new Ubuntu Vagrant base box. | |
# Run the following command in a root shell: | |
# | |
# bash <(curl -s https://gist.github.com/justindowning/5670884/raw/vagrant-clean.sh) | |
function print_green { | |
echo -e "\e[32m${1}\e[0m" | |
} |
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 datetime | |
import hashlib | |
import hmac | |
import urllib.parse | |
def aws_sig_v4_headers(access_key_id, secret_access_key, pre_auth_headers, | |
service, region, host, method, path, query, payload): | |
algorithm = 'AWS4-HMAC-SHA256' |
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
""" | |
Usage: | |
Make sure that redis is running on localhost (or adjust the url) | |
Install uvicorn or some other asgi server https://asgi.readthedocs.io/en/latest/implementations.html | |
pip install -u uvicorn | |
Install dependencies |