Skip to content

Instantly share code, notes, and snippets.

@rvause
rvause / gist:b72e2f4e0ad7f9d773cb
Created September 13, 2014 00:02
I like it when things like this come up from fortunes.
___ ______ Frobtech, Inc.
/__/\ ___/_____/\
\ \ \ / /\\
\ \ \_/__ / \ "If you've got the job,
_\ \ \ /\_____/___ \ we've got the frob."
// \__\/ / \ /\ \
_______//_______/ \ / _\/______
/ / \ \ / / / /\
__/ / \ \ / / / / _\__
@rvause
rvause / pipdeps.py
Last active August 29, 2015 14:06
Prints out all installed packages with their requirements and reverse requirements.
#!/usr/bin/env python
from collections import OrderedDict
import pip
import sys
class PackageInfo(object):
def __init__(self, *args, **kwargs):
self._info_struct = {}
@rvause
rvause / slow_cooker_chilli_stuff.md
Last active August 29, 2015 14:09
Slow Cooker Chilli Stuff

Ingredients

  • 1 onion
  • 1 chilli
  • cumin
  • chilli powder (if you want more kick)
  • turkey
  • tomatoes
  • oil
  • salt
import re
def decamelify(string):
# http://stackoverflow.com/questions/1175208/elegant-python-function-to-convert-camelcase-to-camel-case
return re.sub(
r'((?<=[a-z0-9])[A-Z]|(?!^)[A-Z](?=[a-z]))',
r'_\1',
string,
).lower()
class ConsoleOutputDammit(object):
class Colors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKPINK = '\033[95m'
OKGREEN = '\033[92m'
OKCYAN = '\033[96m'
WARNING = '\033[93m'
FAIL = '\033[91m'
NATIVE = '\033[m'

Keybase proof

I hereby claim:

  • I am rvause on github.
  • I am rvause (https://keybase.io/rvause) on keybase.
  • I have a public key whose fingerprint is B276 D53A 58BF A7F0 AD47 D0E8 65CD 8762 56FC F33E

To claim this, I am signing this object:

'use strict';
var http = require('http');
var https = require('https');
var zlib = require('zlib');
module.exports = function (grunt) {
grunt.registerMultiTask('httpfetch', 'Fetch file over HTTP', function () {
var _this = this;
this.files.forEach(function (file) {
@rvause
rvause / currentfile.py
Last active July 3, 2018 09:57
Put current file path in status bar relative to project directory
import os.path as op
import sublime_plugin
class CurrentFile(sublime_plugin.EventListener):
def on_activated_async(self, view):
encoding = view.encoding()
if encoding == 'Undefined':
encoding = ''
@rvause
rvause / mkpy
Created February 29, 2016 18:09
#!/usr/bin/env python
import os
import sys
class ProgramError(Exception):
pass
# Thinkpad T420
hwmon /sys/devices/virtual/thermal/thermal_zone0/temp
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp2_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp3_input
tp_fan /proc/acpi/ibm/fan
# Semi aggressive
#(0, 0, 55)