Skip to content

Instantly share code, notes, and snippets.

View oyvindio's full-sized avatar

Øyvind Ingebrigtsen Øvergaard oyvindio

View GitHub Profile
Enabled features:
Interfaces........... : ncurses
Plugins.............. : alias charset fifo irc logger xfer
Optional features.... : gcrypt gnutls flock largefile backtrace
Compile with debug... : yes
Documentation........ : no
Disabled features:
- not asked: gtk demo relay
- not found: aspell perl python ruby lua tcl asciidoc source-highlight(needed by asciidoc)
function getSelectedTabIndex() {
return chrome.tabs.getSelected(
function(tab) {
return tab.index;
});
}
"content_scripts": [
{
"matches": [
"http://*/*",
"https://*/*",
"file://*/*",
"ftp://*/*"
],
"js": ["skts.js"]
}
#!/usr/bin/env python
import os
import sys
import shelve
def exportTabSeparated(filename):
shelf = shelve.open(filename)
outFilename = os.path.splitext(os.path.basename(filename))[0] + ".txt"
with open(outFilename, "w") as f:
#!/usr/bin/env python
import os
import sys
import shelve
def exportTabSeparated(filename):
shelf = shelve.open(filename)
dct = dict()
for k in shelf.keys():
@oyvindio
oyvindio / print-uio
Created May 18, 2010 09:32
Print files from your laptop at UiO.
#!/bin/bash
UIO="login.ifi.uio.no"
eval file=\$$#
scp "$file" $UIO:"$file"
ssh $UIO "print $@"
ssh $UIO "rm $file"
diff --git a/src/main/java/no/kvikshaug/gh/modules/Weather.java b/src/main/java/no/kvikshaug/gh/modules/Weather.java
index fb6e02c..9f9c733 100644
--- a/src/main/java/no/kvikshaug/gh/modules/Weather.java
+++ b/src/main/java/no/kvikshaug/gh/modules/Weather.java
@@ -20,6 +20,7 @@ public class Weather implements TriggerListener {
private static final String ALT_TRIGGER_HELP = "temp";
public Weather(ModuleHandler moduleHandler) {
+ /*
moduleHandler.addTriggerListener(TRIGGER, this);
In [9]: flatten_dict({'key':'value', 'inner':{'innerkey':'innervalue', 'innermost':{'innermostkey':'innermostvalue'}}})
Out[9]:
{'inner': {'innerkey': 'innervalue',
'innermost': {'innermostkey': 'innermostvalue'}},
'key': 'value'}
@oyvindio
oyvindio / gist:464099
Created July 5, 2010 07:15
Omgz, Scala no worky!
oyvindio@shredder ~/tmp/gh/grouphugs (scala) $ buildr clean compile package
(in /home/oyvindio/tmp/gh/grouphugs, development)
Cleaning gh
Compiling gh
Compiling gh into /home/oyvindio/tmp/gh/grouphugs/target/classes
/home/oyvindio/tmp/gh/grouphugs/src/main/scala/no/kvikshaug/gh/modules/TrackingXMLParser.scala:92: error: block must end in result expression, not in definition
} catch {
^
/home/oyvindio/tmp/gh/grouphugs/src/main/scala/no/kvikshaug/gh/modules/TrackingXMLParser.scala:122: error: block must end in result expression, not in definition
} catch {
1278327479583 :murr4y!~murray@45.84-49-70.nextgentel.com PRIVMSG #grouphugs :!track 40170714834075052782
Web util opening: 'http://sporing.posten.no/sporing.xml?q=40170714834075052782'...
CharEncoding guesses 'UTF-8'.
sql> SQL query failed (timeout?), attempting reconnection...
sql> SQL error!
sql> Message: table package has no column named packageId
sql> Cause: null
sql> java.sql.SQLException: table package has no column named packageId
java.sql.SQLException: table package has no column named packageId
1278327483268 >>>PRIVMSG #grouphugs :Sorry, SQL is being a bitch. Please check my DB for inconsistencies.