Convert epoch timestamp to UTC
$ date -u -d @1312398568
Mi 3. Aug 19:09:28 UTC 2011
#!/usr/bin/python3 | |
# Simple Script do download the latest wallpaper from Bing | |
from urllib.request import urlopen | |
from pathlib import Path | |
from notify import notification | |
import json | |
target_wallpaper_image = Path.home() / 'Images' / 'Wallpaper' / 'bing.jpg' | |
raw = urlopen('https://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=en-US') |
# Fetch a list of character names for the Wheel of Time (WoT) | |
# and print them as Dokuwiki links. | |
from urllib.request import urlopen | |
from bs4 import BeautifulSoup | |
def fetch_all_names(): | |
# The WoT page groups some first letters together | |
first_letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'op', 'r', 's', 't', 'uz'] | |
all_names = [fetch_character_names(x) for x in first_letters] |
#!/usr/bin/python3 | |
""" | |
Gerrit response for /changes/ endpoint | |
[ | |
{ | |
"id": "gerrit~master~Iacd3f2db3728a9c1936170b575016973bf0336d9", | |
"project": "gerrit", | |
"branch": "master", |
[core] | |
editor = /usr/bin/vim | |
excludesfile = /Users/np/.gitignore_global | |
pager=less -x4 | |
[user] | |
email = name@company.com | |
name = Firstname Lastname | |
[fetch] |
require "java" | |
Dir["/home/michael/Downloads/\*.jar"].each { |jar| require jar } | |
import com.itextpdf.text.BaseColor | |
import com.itextpdf.text.Document | |
import com.itextpdf.text.Paragraph | |
import com.itextpdf.text.Phrase | |
import com.itextpdf.text.pdf.PdfPCell | |
import com.itextpdf.text.pdf.PdfPTable | |
import java.io.FileOutputStream |
# .zshrc | |
# | |
# see http://zsh.sourceforge.net/Doc/Release/index-frame.html | |
# Set FPATH | |
fpath=(${HOME}/.zsh/completion $fpath) | |
# Autoloading | |
autoload -U compinit promptinit colors | |
colors |