Skip to content

Instantly share code, notes, and snippets.

View jraregris's full-sized avatar

Oddmund Strømme jraregris

View GitHub Profile
" VUNDLE VUNDLE VUNDLE :F
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'jpalardy/vim-slime'
1.9.3 --trace
rvm 1.13.0 (master) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]
+ /scripts/cli : __rvm_parse_args() 767 > [[ -n '' ]]
+ /scripts/cli : __rvm_parse_args() 768 > export 'PS4=+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > '
+ /scripts/cli : __rvm_parse_args() 768 > PS4='+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > '
+ /scripts/cli : __rvm_parse_args() 799 > [[ -z install ]]
+ /scripts/cli : __rvm_parse_args() 801 > [[ 0 -eq 1 ]]
+ /scripts/cli : __rvm_parse_args() 801 > [[ -n '' ]]
+ : 177 > export rvm_trace_flag=1
+ : 177 > rvm_trace_flag=1
+ : 182 > true 1 0 0 0 HOME=/home/oddmunds
+ : 186 > (( rvm_ignore_rvmrc == 0 ))
+ : 188 > for rvmrc in /etc/rvmrc '"$HOME/.rvmrc"'
+ : 190 > [[ -s /etc/rvmrc ]]
+ : 188 > for rvmrc in /etc/rvmrc '"$HOME/.rvmrc"'
+ : 190 > [[ -s /home/oddmunds/.rvmrc ]]
+ : 207 > [[ -z '' ]]
+ : 209 > (( UID == 0 ))
@jraregris
jraregris / gist:2109503
Created March 19, 2012 12:07
Penger til overs per dag
#!/usr/bin/env ruby
require 'chronic'
saldo = STDIN.gets.to_i
today = Date.today
p saldo / (Chronic.parse("12th day of #{today.day < 12 ? 'this' : 'next'} month").to_date - today).to_i
require 'minitest/unit'
class TestPrayer < MiniTest::Unit::TestCase
def test_24_hour
pt = PrayerTime.new
assert_equal "00:30", pt.24_hour(11231.23123)
end
end
@jraregris
jraregris / .Xdefaults
Created May 27, 2011 15:53
zeltakz zchemez
!!! drop in Solarized colorscheme for Xresources/Xdefaults
!!SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B RGB HSB
!!--------- ------- ---- ------- ----------- ---------- ----------- -----------
!!base03 #002b36 8/4 brblack 234 #1c1c1c 15 -12 -12 0 43 54 193 100 21
!!base02 #073642 0/4 black 235 #262626 20 -12 -12 7 54 66 192 90 26
!!base01 #586e75 10/7 brgreen 240 #585858 45 -07 -07 88 110 117 194 25 46
!!base00 #657b83 11/7 bryellow 241 #626262 50 -07 -07 101 123 131 195 23 51
!!base0 #839496 12/6 brblue 244 #808080 60 -06 -03 131 148 150 186 13 59
!!base1 #93a1a1 14/4 brcyan 245 #8a8a8a 65 -05 -02 147 161 161 180 9 63
-- Et forsøk på å hente ut
select o.object_userid as "Unit",
userid(a.cb_id) as "CB"
,userid(c.cb_id) as "CB2"
from
objrep o
left join objecttobusbar a on (a.object_id = o.object_id)
left join objecttobusbar c on (c.object_id = o.object_id)
import easyIO.*;
import org.joda.time.*;
import java.util.*;
public class Oblig4 {
/**
* @param args
*
* Sjekker parametere, starter opp ordreløkka etter at filene er lest via konstruktørene til «MetInst».
* Question 2
** a
No, it does not follow that that :a and :b are different. (Note: I've
attempted to use Unicode for the notation, which is dependant on the system
fonts to display as intended. Please let me know if it seems weird. I think I
might be slightly ‘off’ on some of the symbols, but I think it will be
sufficently clear to understand what I mean.)
{ Place ⊑ ⊤,
#!/bin/bash
# Requires wget, grep, and id3v2.
export tmp="tumblrtmp"
echo "Wgetting $1..." &&
`wget -q -O $tmp $1` &&
echo "Applying magic..."
export url=`grep -Po "(?<=audio_file=).*(?=&)" $tmp`
rm $tmp