Skip to content

Instantly share code, notes, and snippets.

View biggest rect.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
flying-sheep /
Created Jan 23, 2014
Extension of the Autobahn|Python WebSocket server for HTTP
#!/usr/bin/env python3
import sys
import mimetypes
from os import listdir, path as p
from argparse import ArgumentParser
from email.utils import formatdate
import os.path
from base64 import b64decode
from PyQt4.QtCore import QDir
HOST_DB = os.path.expanduser('~/.dropbox/host.db')
def get_dropbox_dir():
flying-sheep / PKGBUILD
Created Mar 9, 2014
RetroArch-Phoenix PKGBUILD
#Contributor Themaister <>
pkgdesc='Simple launcher and configuration tool for RetroArch.'
arch=('i686' 'x86_64')
#Maintainer ...
#Contributor "flying sheep" <>
arch=('i686' 'x86_64')
View hs_err_pid11171.log
# A fatal error has been detected by the Java Runtime Environment:
# SIGILL (0x4) at pc=0x00007faf88a69acd, pid=11171, tid=140392123442944
# JRE version: OpenJDK Runtime Environment (7.0_51-b31) (build 1.7.0_51-b31)
# Java VM: OpenJDK 64-Bit Server VM (24.51-b03 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [] QChar::toLower() const+0xd
from collections import OrderedDict
from import Iterable
class ModOD(OrderedDict):
def __repr__(self):
if not len(self):
return 'od()'
return 'od[' + ', '.join('{}: {}'.format(k, v) for k, v in self.items()) + ']'
od_syntax_error = SyntaxError('Allowed sytax: od[<k>: <v>(, <k>: <v>, …)] or od()')
flying-sheep /
Last active Aug 29, 2015
rust for c++ programmers mirror

Rust for C++ programmers

part 1: Hello world

This is the first in a series of blog posts (none written yet) which aim to help experienced C++ programmers learn Rust. Expect updates to be sporadic at best. In this first blog post we'll just get setup and do a few super basic things. Much better resources are at the tutorial and reference manual.

First you need to install Rust. You can download a nightly build from (I recommend the nighlties rather than 'stable' versions – the nightlies are stable in that they won't crash too much (no more than the stable versions) and you're going to have to get used to Rust evolving under you sooner or later anyway). Assuming you manage to install things properly, you should then have a rustc command available to you. Test it with rustc -v.

Now for our first program. Create a file, copy

View 0001-Used-variable-in-source-jar-build.patch
From ae1badbc0513d17014e389c5511dae1981bcf251 Mon Sep 17 00:00:00 2001
From: Phil Schaf <>
Date: Wed, 4 Jun 2014 12:49:42 +0200
Subject: [PATCH] Used variable in source jar build
build.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build.xml b/build.xml
View highlighter.htm
<!DOCTYPE html>
<meta charset="UTF-8">
<meta name="Generator" content="Kate, the KDE Advanced Text Editor">
pre.kate {