Skip to content

Instantly share code, notes, and snippets.

View rwos's full-sized avatar
💾
🥳

Richard Wossal rwos

💾
🥳
View GitHub Profile
import subprocess, os, random, re
from Tkinter import *
from turtle import *
import turtle
def ping(host):
process = os.popen("ping -c 1 -n -w 1 "+host, "r")
output = process.read()
if "unknown host" in output:
print host+" | unknown | 0"
@rwos
rwos / make
Created April 3, 2013 10:43
plots a graph of the modification times of all the files in ~/src (year on x-axis, hour on y-axis)
#!/bin/bash
find ~/src -printf '%CY-%Cm-%Cd %CH %CM\n' | \
awk '{print $1" "$2"."($3/59)*100;}' | \
sed 's/\.[^.]\+$//' > times.dat
gnuplot plot.gp > plot.png
@rwos
rwos / all-phpcs-sniffs.sh
Last active December 19, 2015 13:59
print all available phpcs sniffs
for std in `phpcs -i | sed -e 's/.*are//' -e 's/,\|and//g'`; do phpcs --standard="$std" -vvv /dev/null | grep Registered; done | sort | uniq | awk '{print $2}' | sed -e 's/_Sniffs//' -e 's/_/./g' -e 's/Sniff$//'
@rwos
rwos / watch-screencast
Last active December 20, 2015 05:29
download and watch screencast.com screencasts without quicktime. needs vlc and curl
#!/bin/sh
# usage:
# $ watch-screencast http://www.screencast.com/t/WHATEVER
url="$1"
source="`curl "$url" | \
grep '"http://content.screencast.com[^"]*media' | \
sed -e 's/.*src="//' -e 's/".*//'`"
Verifying that +r_____ is my blockchain ID. https://onename.com/r_____

Keybase proof

I hereby claim:

  • I am rwos on github.
  • I am rwos (https://keybase.io/rwos) on keybase.
  • I have a public key whose fingerprint is 40C7 540F 26DB 0FCB 059B F2F6 FC9E 6FF8 3D61 F1B3

To claim this, I am signing this object:

diff --git a/registry/storage/driver/gcs/gcs.go b/registry/storage/driver/gcs/gcs.go
index 86dc87f1..72bdf4ef 100644
--- a/registry/storage/driver/gcs/gcs.go
+++ b/registry/storage/driver/gcs/gcs.go
@@ -10,7 +10,6 @@
// Note that the contents of incomplete uploads are not accessible even though
// Stat returns their length
//
-// +build include_gcs
@rwos
rwos / Makefile
Created November 12, 2019 14:23
local docker swarm cluster with docker-machine
SHELL=/bin/bash
all:
-$(MAKE) clean
$(MAKE) start
$(MAKE) join
start:
docker-machine create --driver virtualbox d1
docker-machine create --driver virtualbox d2