Skip to content

Instantly share code, notes, and snippets.

View fayesafe's full-sized avatar

Dominic Pfeil fayesafe

  • Germany
View GitHub Profile
@fayesafe
fayesafe / 2bwm-default.nix
Created May 23, 2019 06:09
nixos 2bwm patches
{ stdenv, fetchFromGitHub, conf ? null, patches
, libxcb, xcbutilkeysyms, xcbutilwm
, libX11, writeText, xcbutil, xcbutilxrm }:
with stdenv.lib;
stdenv.mkDerivation rec {
version = "0.2";
name = "2bwm-${version}";
#!/usr/bin/env python3
"""Script to create a random wallpaper based on a single input color
Example: wpirify.py 1920 1080 -c "#4B9A62" -e "#CAEFC7"
"""
import argparse
from math import gcd
from random import choice, randint
import string
import numpy as np
interface func {
(arg: any): any;
}
function compose(...funcs: func[]): func {
if (funcs.length === 1) {
return (arg: any) => funcs.shift()(arg);
} else if (funcs.length > 1) {
return (arg: any) => funcs.reduceRight((prev, item) => item(prev), arg);
} else {
function compose(...funcs) {
if (funcs.length == 1) {
return arg => funcs.shift()(arg)
} else if (funcs.length > 1) {
return arg => funcs.reduceRight((val, func) => func(val), arg)
} else {
return null;
}
}
#!/usr/bin/env python3
import argparse
import json
import requests
import sys
BASE_URL = 'http://thesaurus.altervista.org/thesaurus/v1'
KEY = ''
#!/usr/bin/env python3
import argparse
import json
import requests
import sys
USER_NAME = ''
API_TOKEN = ''
#!/usr/bin/env python3
import json
from mutagen.mp3 import MP3
from mutagen.id3 import ID3, APIC, error, TIT2, TALB, TPE1, TRCK, TCO
import os
import re
import requests
import sys
import time
#!/usr/bin/env python3
import argparse
import os
def main(todo_file, argv):
if (argv.add):
add_task(todo_file, argv.add)
elif (argv.delete):
delete_task(todo_file, argv.delete)