Skip to content

Instantly share code, notes, and snippets.

@olund
olund / log_sum.sh
Last active September 16, 2015 15:04
#!/bin/bash
if [ "$#" -le 0 ]; then
echo "Usage $0 [-n N] (-c|-2|-r|-F|-t) <filename>"
exit 2
fi
FILE="${@: -1}" #File is the last argument
nrOfResult=0
#!/bin/bash
if [ "$#" -le 0 ]; then
echo "Usage $0 [-n N] (-c|-2|-r|-F|-t) <filename>"
exit 2
fi
FILE="${@: -1}" #File is the last argument
nrOfResult=0
/**
* Router
*
* Example usage..
*
* var http = require('http');
* var router = new Router();
*
* // Write a simple route..
* router.get('/', function(req, res) {
# This file has been auto-generated by
#i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
/**
* Half size
*/
t3.onclick = (function() {
this.className = (this.swap++ % 2) ? 'baddie half-size' : 'baddie';
});
/**
* Double size
*/
@olund
olund / PrefSublime
Created October 23, 2014 08:49
Olund Sublime Text 2
{
"color_scheme": "Packages/Predawn/predawn.tmTheme",
"default_encoding": "UTF-8",
"default_line_ending": "unix",
"detect_indentation": false,
"file_exclude_patterns":
[
".DS_Store",
"Desktop.ini",
"*.pyc",
INSERT INTO Deliveries (S, P, QTY)
VALUES (1, 1, 300),
(1,2,200),
(1,3,400),
(1,4,200),
(1,5,100),
(1,6,100),
(2,1,300),
(2,2,400),
{
"color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow-Night-Eighties.tmTheme",
"default_encoding": "UTF-8",
"default_line_ending": "unix",
"detect_indentation": false,
"file_exclude_patterns":
[
".DS_Store",
"Desktop.ini",
"*.pyc",
@olund
olund / .zshrc
Created April 25, 2014 10:18
My .zshrc file
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="intheloop"
# Example aliases
template<typename T>
void List<T>::insertAt(T data, int pos) {
// Om pos = 0, lägg först
// Listan är tom: lägg först
// Pos > antalet noder, lägg sist
// pos > & <= antalet noder lägg emellan.
// skapa en ny nod
if(pos < 0) {