Skip to content

Instantly share code, notes, and snippets.

Avatar

Kimmo Brunfeldt kimmobrunfeldt

View GitHub Profile
@kimmobrunfeldt
kimmobrunfeldt / blog-backend-api.py
Last active Aug 29, 2015
Simple blog REST API with Eve http://python-eve.org/. Install Mongo and Eve and you're good to go!
View blog-backend-api.py
"""
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 Aug 29, 2015
How I setup my Mac for web development
View 0-setup-osx.md

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 Apr 8, 2014
Find your points in Johtika
View johtika.sql
SELECT * from Opiskelija, Suoritus, Suorite WHERE SUORITUS.Opiskelija = Opiskelija.Opnum AND Suoritus.Suorite = Suorite.SuoriteID AND Opnum='XXXXXX';
View analyzer.py
#!/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 Aug 29, 2015
Parse http://hwo.azurewebsites.net/, show only subset of teams and write output to file
View hwoteams.js
// 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 Aug 29, 2015
Summary of audio/media support in Windows Phones' Internet Explorer(versions 9-11)
View 0-audio-support-mobile-ie.md
View timeline.js
// 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 Nov 29, 2014
Particles.js example
View index.html
<!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 {