Skip to content

Instantly share code, notes, and snippets.

@andreasio
andreasio / .hgrc
Created November 8, 2016 13:54 — forked from hofmannsven/.hgrc
Notes on working with Mercurial
# Global config for Mercurial
[ui]
username = Username <name@domain.com>
editor = nano
ignore = ~/.hgignore
library(httr)
# example
cvrnumbers <- c('10112354', '57471719', '82675418')
cvr2name <- function(cvrnumbers, useragent="mit projekt") {
# this gets company data from cvrapi.dk - its important to specify your project in useragent.
# Its easy to get banned if you don't
require(httr)
results <- vector(length=length(cvrnumbers))
for (i in 1:length(cvrnumbers)) {
@andreasio
andreasio / matplotlibrc
Created July 18, 2012 06:26 — forked from huyng/matplotlibrc
my default matplotlib settings
### MATPLOTLIBRC FORMAT
# This is a sample matplotlib configuration file - you can find a copy
# of it on your system in
# site-packages/matplotlib/mpl-data/matplotlibrc. If you edit it
# there, please note that it will be overridden in your next install.
# If you want to keep a permanent local copy that will not be
# over-written, place it in HOME/.matplotlib/matplotlibrc (unix/linux
# like systems) and C:\Documents and Settings\yourname\.matplotlib
# (win32 systems).
@andreasio
andreasio / battery.py
Created May 7, 2012 21:59 — forked from lloeki/battery.py
Battery status script for Mac OS X
#!/usr/bin/env python
from __future__ import print_function
from __future__ import division
import re
import sys
from subprocess import Popen, PIPE
def ioreg_battery_info():
@andreasio
andreasio / hack.sh
Created April 2, 2012 10:04 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#