Skip to content

Instantly share code, notes, and snippets.

View johanforssell's full-sized avatar

Johan Forssell johanforssell

  • NaN
  • Sweden
  • 13:07 (UTC +02:00)
View GitHub Profile
@johanforssell
johanforssell / gist:8237848
Last active January 2, 2016 02:29
Simple web server which accepts chunked uploads and responds with a dummy json
#!/usr/bin/python
import time
import BaseHTTPServer
import json
from pprint import pprint
HOST_NAME = '192.168.1.89'
PORT_NUMBER = 9494
media_results = {
@johanforssell
johanforssell / gist:5386976
Created April 15, 2013 09:29
Shell-alias 'week' för att kolla med http://vecka.nu vilken vecka det är. Kommer att gå sönder när de designar om sidan.
alias week="curl --silent --url http://vecka.nu | egrep '<div style=\"color: #066EB0; font-family: Arial; font-size: 220pt; line-height: 220pt; font-weight: bold;\">[0-9]*</div>' | sed -e 's/.*>\([0-9]*\)<.*/\1/'";