Skip to content

Instantly share code, notes, and snippets.

View rchrand's full-sized avatar

Rune Andersen rchrand

View GitHub Profile
@rchrand
rchrand / angular-app.js
Created April 9, 2014 16:48
AngularJS update problem
var blogApp = angular.module('blogApp', [
"ngRoute",
"blogControllers",
"blogFilters",
"blogServices"]);
blogApp.config(['$routeProvider',
function($routeProvider) {
$routeProvider.
when('/', {

Keybase proof

I hereby claim:

  • I am runeandersen92 on github.
  • I am runeandersen92 (https://keybase.io/runeandersen92) on keybase.
  • I have a public key whose fingerprint is D56E 8CD3 845F 7EF2 E075 1C2F C54A CF98 FCAC A52C

To claim this, I am signing this object:

@rchrand
rchrand / init.el
Last active August 29, 2015 14:25
(require 'package)
(require 'cl)
;; Load anything in site-lisp
(eval-and-compile
(mapc
#'(lambda (path)
(push (expand-file-name path user-emacs-directory) load-path))
'("site-lisp")))
@rchrand
rchrand / gist:3731814
Created September 16, 2012 09:47
Java - int min
public int min(){
int minimum = list.get(0);
for (int i: list){
if (i <= minimum) {
minimum = i;
}
}
return minimum;
}
from Monster import Monster
from Person import Person
import random
from sys import exit
#class Person(object):
# def __init__(self, name):
# self.name = name
# self.life = 100
@rchrand
rchrand / style.css
Created November 12, 2012 16:25
index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>My website!</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description"
content="Placeholder, Placeholder" />
<meta name="keywords" content="Placeholder, placeholder" />
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
@rchrand
rchrand / xkcd.py
Created February 12, 2013 11:15
Xkcd comic script
from bs4 import BeautifulSoup
import requests
import os
images = []
final = ""
r = requests.get('http://xkcd.com/')
soup = BeautifulSoup(r.content)
@rchrand
rchrand / JP.java
Created February 25, 2013 09:40
Java searching recursive
public class SearchSize extends SwingWorker<Long, Long> {
private String currentPath;
private JLabel lblSize;
private long totalSize = 0;
public SearchSize(String path, JLabel lblSize){
this.currentPath = path;
this.lblSize = lblSize;
}
@rchrand
rchrand / package.json
Created May 16, 2013 15:02
JSON: Test
{
"name": "bootstrap"
, "description": "Sleek, intuitive, and powerful front-end framework for faster and easier web development."
, "version": "2.3.1"
, "keywords": ["bootstrap", "css"]
, "homepage": "http://twitter.github.com/bootstrap/"
, "author": "Twitter Inc."
, "scripts": { "test": "make test" }
, "repository": {
"type": "git"
@rchrand
rchrand / .Xdefaults
Created May 27, 2013 21:15
Dotfiles for Tmux, Vim, Xdefaults and Zsh
#define S_base03 #002b36
#define S_base02 #073642
#define S_base01 #586e75
#define S_base00 #657b83
#define S_base0 #839496
#define S_base1 #93a1a1
#define S_base2 #eee8d5
#define S_base3 #fdf6e3
#define S_yellow #b58900
#define S_orange #cb4b16