Skip to content

Instantly share code, notes, and snippets.

View christopherobin's full-sized avatar
🏠
Working from home

Christophe Robin christopherobin

🏠
Working from home
  • Bloomberg LP
  • Tokyo, Japan
View GitHub Profile
@christopherobin
christopherobin / generate.sh
Created August 8, 2017 02:27
Dual screen wallpapers with hourly random change (gnome/mate)
#!/bin/sh
# Drop all your images in a folder, let's call it /tmp/wallpapers then run this
# Take all your files from the output folder and put them somewhere in your
# home folder (like ~/Pictures/Wallpapers)
RES=$( xrandr | grep primary | awk '{ print $4 }' | cut -d '+' -f 1 )
mkdir output 2>/dev/null
for a in *.{png,jpg,tga}; do
for b in *.{png,jpg,tga}; do
@christopherobin
christopherobin / printUpdate.py
Created September 14, 2017 08:06
Pretty update information for yum distros
#!/usr/bin/env python
import rpm
import yum
from operator import itemgetter
def colorize(str, col):
return "\x1b[%d;1m%s\x1b[0m" % (col, str)