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 xml.etree.ElementTree as ET | |
N = 50 | |
CLASS_COLOUR = { | |
'motorway': '#0079c1', | |
'trunk': '#00703c', | |
'primary': '#ffffff' | |
} |
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
body { | |
background-color: #1a2228; | |
color: #ddd; | |
font-family: Roboto, sans-serif; | |
margin: 0; | |
} | |
#container { | |
background-color: #44545e; | |
margin: 0 auto; |
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 re | |
USER = 'USERNAME' | |
TOKEN = 'TOKEN' | |
def get_discogs_release_page(page): | |
url = '/'.join(['https://api.discogs.com/users', USER, 'collection/folders/0/releases']) |
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
COMMAND1="" | |
get_push () { | |
COMMAND2=$(curl -s --header 'Access-Token: <<PUT YOUR ACCESS TOKEN HERE>>' --data-urlencode limit=1 --get https://api.pushbullet.com/v2/pushes | sed 's/.*body":"\(.*\)"}].*/\1/' | tr [:lower:] [:upper:]) | |
} | |
get_osc () { | |
while read line; do | |
case "$line" in | |
*"$COMMAND2"*) |
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
curl -X GET https://en.wiktionary.org/w/index.php\?title\=terminal\&action\=raw | sed -n '/==English==/,/----/p' | grep '\# ' | sed 's/{{\(.*\)}}/\1/;s/\[\[//g;s/\]\]//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
#!/bin/bash | |
if [ $1 = 'ECOLOUR' ]; then | |
wget http://rosco.com/filters/ecolour.cfm -O - | grep '\(id="colorSwatch"\)\|\(<b>E-Colour\)\|\(<img src="../mycolor\)' | sed 's/.*\(#[a-f0-9]\{6\}\).*/\U\1\E,/;s/<\/b>//;s/.*\(#[0-9]\+\): \(.*\)/\1,\2,,/;s/.*mycolor.*/#FFFFFF,/' | tr -d '\n' | sed 's/,\{2\}/\n/g' | |
elif [ $1 = 'SUPERGEL' ]; then | |
wget http://rosco.com/filters/supergel.cfm -O - | grep '\(id="colorSwatch"\)\|\(<strong>Supergel\)\|\(<img src="../mycolor\)' | sed 's/.*\(#[a-f0-9]\{6\}\).*/\U\1\E,/;s/<\/strong>//;s/.*\(#[0-9]\+\): \(.*\)/\1,\2,,/;s/.*mycolor.*/#FFFFFF,/' | tr -d '\n' | sed 's/,\{2\}/\n/g' | |
else | |
echo 'You need to specify a type of gel, ECOLOUR or SUPERGEL.' | |
fi |