Skip to content

Instantly share code, notes, and snippets.

@helb
helb / artpip.sh
Created July 4, 2017 10:51
artpip.com daily wallpaper
#!/bin/sh
set -e;
curl http://artpip.com/api/featured |
jq ".artworks[0].url" |
xargs -n1 curl > /tmp/wall.jpg &&
feh --bg-fill /tmp/wall.jpg;
@helb
helb / javascriptWorker.js
Created June 12, 2017 12:07
regex101 js worker
// this is just unminified https://regex101.com/javascriptWorker.js
! function(e) {
function t(r) {
if (n[r]) return n[r].exports;
var o = n[r] = {
i: r,
l: !1,
exports: {}
};
@helb
helb / gen.py
Created May 23, 2017 15:01
lyricsgen
import requests
from random import choice
from bs4 import BeautifulSoup
import json
import peewee
db = peewee.SqliteDatabase("lyricsgen.sqlite3")
parser = "html.parser"
curl -s "https://cs.wikipedia.org/wiki/Seznam_obc%C3%AD_v_%C4%8Cesku" | pup "#content #bodyContent #mw-content-text div table tbody tr td div a" | grep -v "<" | sed "s/^ //" | sort
import re
import pyphen
NONBREAKABLE_WORDS = [ # nektera slova (napr. nazev firmy) se hodi nerozdelovat
"…",
"…"
]
def hyphens(text, lang):
"""
rofi.color-enabled: true
rofi.color-window: #010101, #002b36, #000000
rofi.color-normal: #010101, #eeeeee, #060606, #e2260b, #eee8d5
rofi.color-active: #d64937, #fff5ce, #c93e2c, #f34e05, #fdf6e3
rofi.color-urgent: #000000, #ff9a00, #010101, #ff2700, #fdf6e3
rofi.font: Input Mono 10
rofi.bw: 0
rofi.padding: 2
rofi.terminal: urxvtc
rofi.hide-scrollbar: true
@helb
helb / update.sh
Created April 5, 2016 14:09
meteor update all packages
for i in `sed "s/@.*//" .meteor/versions`; do meteor update $i; done
@helb
helb / gist:f98122f85ed04d978868
Last active August 11, 2016 10:12
convert require() to import
find:
(var|const) ([a-zA-Z]+) = require\((.+)\)
replace with:
import $2 from $3
@helb
helb / .scss-lint.yml
Created March 15, 2016 15:14
scss lint config
linters:
Indentation:
severity: warning
width: 4
LeadingZero:
enabled: true
style: include_zero
NestingDepth:
enabled: true
max_depth: 4