Skip to content

Instantly share code, notes, and snippets.

View oyvindio's full-sized avatar

Øyvind Ingebrigtsen Øvergaard oyvindio

View GitHub Profile
@oyvindio
oyvindio / urxvt-gcc4.4.patch
Created December 13, 2009 22:50
Patch for rxvt-unicode to make it compile on Ubuntu 9.10
--- src/background.C.orig 2009-04-25 01:12:46.000000000 +0200
+++ src/background.C 2009-04-25 01:19:21.000000000 +0200
@@ -261,7 +261,7 @@
unsigned int w = 0, h = 0;
unsigned int n;
unsigned long new_flags = (flags & (~geometryFlags));
- char *p;
+ const char *p;
# define MAXLEN_GEOM 256 /* could be longer than regular geometry string */
@oyvindio
oyvindio / spotify
Created December 26, 2009 18:12
Wrapper script for starting Spotify when run through wine.
#!/bin/sh
# Opens a Spotify URI passed as arg, or starts Spotify if executed without args
SPOTIFY_PATH="$HOME/.wine/drive_c/Program Files/Spotify/spotify.exe"
if [ "$#" -eq 1 ]; then
wine "$SPOTIFY_PATH" /uri "$1"
else
wine "$SPOTIFY_PATH"
fi
@oyvindio
oyvindio / flac2mp3
Created February 18, 2010 11:36
Converts FLACs to Mp3s (lame V0).
#!/bin/bash
TARGET_DIR="/tmp/"
shopt -s extglob
for FLAC_DIR in "$@"
do
MP3_DIR="$TARGET_DIR/$(basename "$FLAC_DIR") (V0)"
mkdir -p "$MP3_DIR"
@oyvindio
oyvindio / Add a protocol handler for Spotify
Created February 19, 2010 07:30
How to make Spotify links work in GNOME.
gconftool-2 -t string -s /desktop/gnome/url-handlers/spotify/command "<path to spotify wrapper script> %s"
gconftool-2 -s /desktop/gnome/url-handlers/spotify/needs_terminal false -t bool
gconftool-2 -s /desktop/gnome/url-handlers/spotify/enabled true -t bool
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Filling out forms is hard, let's do some Python.
This program determines the symbol and word count excluding markup for
a (X)HTML document, by passing a POST request to the count_words.php
script at the INF5270 web site.
Note that there is NO error handling whatsoever, so use at your own peril.
\documentclass[a4paper, 11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
%\usepackage[norsk]{babel}
\usepackage{epsfig, times}
\usepackage{amsmath}
\usepackage{verbatim}
\usepackage{cite}
%\usepackage{uiosloforside}
>>> np.average(runtimes)
0.026240115346908569
>>> np.std(runtimes)
0.0093610521219894029
>>> min(runtimes)
3.5047531127929688e-05
>>> max(runtimes)
>>> np.average(runtimes)
0.0023430713295936583
>>> np.std(runtimes)
0.079931433047229744
>>> min(runtimes)
2.09808349609375e-05
>>> max(runtimes)
>>> np.average(runtimes)
0.012782844924926758
>>> np.std(runtimes)
0.030188058451403252
>>> min(runtimes)
0.0001430511474609375
>>> max(runtimes)
#
# WeeChat configuration file, created by WeeChat v0.2.6.3 on Mon Apr 19 12:48:26 2010
# WARNING! Be careful when editing this file, WeeChat writes this file when exiting.
#
[look]
look_save_on_exit = on
look_set_title = on
look_startup_logo = on
look_startup_version = on