Skip to content

Instantly share code, notes, and snippets.

@manuelbua
manuelbua / pr.md
Created February 27, 2013 22:31 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

Python Number Conversion Chart

From To Expression

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using:

  • virtualenv
  • Django
  • nginx
  • uwsgi
"""
A systemd socket activated TLS twisted.web server.
$ tree /srv/www/
/srv/www/
`-- www.example.com
|-- server.key
|-- server.pem
|-- server.tac.py
`-- static
@manuelbua
manuelbua / PKGBUILD
Created January 14, 2014 18:43 — forked from huyderman/PKGBUILD
# Maintainer: Jo-Herman Haugholt <[email protected]>
pkgname=gitver-git
pkgver=0.0.0
pkgrel=1
pkgdesc="Simple version string management for git"
arch=('any')
url="https://github.com/manuelbua/gitver"
license=('Apache')
groups=()
#!/usr/bin/python
'''
Python implementation of passcode hashing algorithm used on the Samsung Galaxy S4 GT-I9505 4.2.2
Correct PIN for hash and salt below is 1234.
Get 40-character hash value in ascii hex format from file /data/system/password.key on the phone
Get salt in signed numeric format by doing sqlite3 query SELECT value FROM locksettings WHERE name = 'lockscreen.password_salt' on /data/system/locksettings.db
import java.awt.GraphicsEnvironment;
public class ListJavaFonts
{
public static void main(String[] args)
{
String fonts[] =
GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
<VirtualHost *>
ServerName example.com
WSGIDaemonProcess www user=max group=max threads=5
WSGIScriptAlias / /home/max/Projekte/flask-upload/flask-upload.wsgi
<Directory /home/max/Projekte/flask-upload>
WSGIProcessGroup www
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input.Keys;
import com.badlogic.gdx.InputAdapter;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.GL10;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Pixmap.Format;
import com.badlogic.gdx.graphics.Texture;