Skip to content

Instantly share code, notes, and snippets.

View jraregris's full-sized avatar

Oddmund Strømme jraregris

View GitHub Profile
class Friend {
private Person self;
private Friend next;
Friend (Person self) {
this.self = self;
}
/**
import java.util.ArrayList;
import java.util.Collections;
class Juks{
static final int MAX = 1000000;
static ArrayList<Integer> a = new ArrayList<Integer>(MAX);
public static void main(String args[]){
lagList();
int teller = 0;
@jraregris
jraregris / gist:99463
Created April 21, 2009 23:16
irssi script for saving urls posted in channels or chats as del.icio.us bookmarks. I added the option to save as a private bookmark.
########################################################################################################
##
## Log URL's and post them to del.icio.us
##
########################################################################################################
BEGIN { $ENV{HARNESS_ACTIVE} = 1 }
use IO::Handle;
use Irssi;
@jraregris
jraregris / superlatex
Created February 2, 2009 15:14
My first bash from many years ago :). Automates a repetative task. (Already solved with pdflatex).
#!/bin/bash
# My first bash from many years ago :)
#
echo "Hvilken fil snakker vi om? (uten .tex-endelse):"
read fname
latex $fname.tex
dvips $fname.dvi
ps2pdf $fname.ps
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
export HISTCONTROL=ignoredups
# ... and ignore same sucessive entries.
# Conky configuration
# Check http://conky.sf.net for an up-to-date command list.
# set to yes if you want Conky to be forked in the background
background yes
# X font when Xft is disabled, you can pick one with program xfontsel
#font 5x7
#font 6x10
#font 7x13
# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
#
# boosty likes it like that:
# ~/dev/dir[master]$ # clean working directory
# ~/dev/dir[master⚡]$ # dirty working directory
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "⚡"
}