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/python | |
from slugify import slugify # this will have to be installed via pip | |
import subprocess | |
import time | |
blog_dir = "/home/you" # CHANGE THIS | |
blog_name = "blog" # CHANGE THIS | |
posts_dir = "/_posts" |
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 time | |
import adafruit_lis3dh | |
import adafruit_ssd1306 | |
import board | |
import busio as io | |
from digitalio import DigitalInOut, Direction, Pull | |
import neopixel | |
pixels = neopixel.NeoPixel(board.NEOPIXEL, 10, brightness=.2) | |
BLUE = (0, 0, 0x10) |
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 | |
import sys | |
with open(sys.argv[1]) as fp: | |
for l in fp.read().split("\n"): | |
parts = l.split("@") | |
if len(parts) != 2: continue | |
url = "https://{}/@{}.json".format(parts[1], parts[0]) | |
try: | |
r = requests.get(url) |
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
## | |
## A cat! | |
## | |
## from https://user.xmission.com/~emailbox/ascii_cats.htm | |
## | |
$the_cow = <<EOC; | |
$thoughts | |
$thoughts | |
/\\_/\\ | |
>^.^<.---. |
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
[{"type": "flying", "name": "Aerial Ace", "gym": {"duration": 2.4, "damage": 55, "critical_percentage": 0}, "pokemon": ["Beedrill", "Pidgey", "Pidgeotto", "Pidgeot", "Spearow", "Fearow", "Farfetch'd", "Doduo", "Dodrio", "Scyther", "Hoothoot", "Ledyba", "Ledian", "Togetic", "Xatu", "Aipom", "Yanma", "Gligar", "Delibird", "Mantine", "Treecko", "Grovyle", "Sceptile", "Taillow", "Swellow", "Nincada", "Ninjask", "Shedinja", "Swablu", "Tropius", "Rayquaza", "Starly", "Staravia", "Kricketune", "Mothim", "Ambipom", "Glameow", "Purugly", "Mantyke", "Togekiss", "Yanmega", "Gliscor"], "pvp": {"damage": 55, "energy": 45}}, {"type": "flying", "name": "Air Cutter", "gym": {"duration": 2.7, "damage": 60, "critical_percentage": 0}, "pokemon": ["Pidgey", "Pidgeotto", "Zubat", "Golbat", "Farfetch'd", "Crobat", "Beautifly", "Wingull", "Masquerain"], "pvp": {"damage": 60, "energy": 55}}, {"type": "rock", "name": "Ancient Power", "gym": {"duration": 3.5, "damage": 70, "critical_percentage": 0}, "pokemon": ["Exeggcute", "Omanyte", |
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 | |
bump=$1 | |
if [ -z $bump ]; then | |
echo "need to provide an action" | |
exit 1 | |
fi | |
tag=($(git describe --abbrev=0 --tags | perl -pe 's/^v?(\d+)\.(\d+)\.(\d+)$/\1 \2 \3/g')) |
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 json | |
import sys | |
floors = { | |
'good': 1, | |
'great': 2, | |
'ultra': 3, | |
'weather': 4, | |
'best': 5, | |
'hatch': 10, |
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
const date = '\\d{4}-\\d{2}-\\d{2}', | |
contextre = /\B@\w+/g; | |
projectre = /\B\+\w+/g, | |
tagre = /[\w\-_]+:[\w\-_]+/g; | |
const pluckAll = (raw, re) => { | |
let matches = raw.match(re); | |
if (matches) { | |
matches.forEach(p => { | |
let position = raw.indexOf(p); |
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
git push -u origin $(git rev-parse --abbrev-ref HEAD) && gh pr create |
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 | |
git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D |
OlderNewer