Skip to content

Instantly share code, notes, and snippets.

View kimmobrunfeldt's full-sized avatar

Kimmo Brunfeldt kimmobrunfeldt

View GitHub Profile
@kimmobrunfeldt
kimmobrunfeldt / blog-backend-api.py
Last active August 29, 2015 13:57
Simple blog REST API with Eve http://python-eve.org/. Install Mongo and Eve and you're good to go!
"""
1. Install Mongo
2. pip install eve
3. python blog-backend-api.py
"""
# Mongo setup
MONGO_PORT = 27017
MONGO_USERNAME = 'test-blog'
MONGO_PASSWORD = 'test-blog'
@kimmobrunfeldt
kimmobrunfeldt / 0-setup-osx.md
Last active August 29, 2015 13:58
How I setup my Mac for web development

How to setup OS X for web development

  • Download Command Line Tools for your OS X version from: https://developer.apple.com/downloads/

  • Install Homebrew, it's a third party package manager for OS X: http://brew.sh/

  • System preferences

    • Set key repeat fast and delay minimum from system preferences
    • Set screen auto dimming off
  • Disable rubber band scrolling

@kimmobrunfeldt
kimmobrunfeldt / johtika.sql
Created April 8, 2014 10:53
Find your points in Johtika
SELECT * from Opiskelija, Suoritus, Suorite WHERE SUORITUS.Opiskelija = Opiskelija.Opnum AND Suoritus.Suorite = Suorite.SuoriteID AND Opnum='XXXXXX';
#!/usr/bin/python
# -*- coding: UTF-8 -*-
#
# Written by Kimmo Brunfeldt
# IRClog stats generator.
import re
import sys
import time
import logger
@kimmobrunfeldt
kimmobrunfeldt / hwoteams.js
Last active August 29, 2015 13:59
Parse http://hwo.azurewebsites.net/, show only subset of teams and write output to file
// Install:
// npm install lodash request cheerio
// Usage:
// nodejs hwoteams.js
var request = require('request')
, cheerio = require('cheerio');
var fs = require('fs');
var _ = require('lodash');
@kimmobrunfeldt
kimmobrunfeldt / 0-audio-support-mobile-ie.md
Last active August 29, 2015 14:01
Summary of audio/media support in Windows Phones' Internet Explorer(versions 9-11)
// Usage:
// npm install underscore
// node timeline.js
var _ = require('underscore');
var TimelineGrid = (function(options) {
/*
Module to help positioning boxes on a vertical timeline.
Boxes are added as tightly as possible while keeping chronological
@kimmobrunfeldt
kimmobrunfeldt / index.html
Created November 29, 2014 11:29
Particles.js example
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Particles</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
#particles {