Skip to content

Instantly share code, notes, and snippets.

View allcaps's full-sized avatar

Coen van der Kamp allcaps

  • Four Digits
  • Arnhem
View GitHub Profile
import sys
import math
import pygame
from itertools import combinations
pygame.init()
maxfps = 30
@allcaps
allcaps / 0_reuse_code.js
Created November 27, 2015 16:32
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<!doctype html>
<html>
<head>
<style>
#container {
border: 10px solid red;
padding: 10px;
}
#container.fullscreen {
@allcaps
allcaps / .gitignore
Last active August 29, 2015 14:26
Carousel slider with truncated next and previous images. Mobile first, responsive. I try to stay close to Twitter Bootstrap markup
bootstrap
jquery
@allcaps
allcaps / postar.py
Last active August 29, 2015 14:25
Translate *.po file to asterisk strings.
#!/usr/bin/python
import sys, getopt
import re
from string import maketrans
intab = "mnbvcxzlkjhgfdsapoiuytrewq0987654321MNBVCXZLKJHGFDSAPOIUYTREWQ"
outtab = len(intab) * "*"
trantab = maketrans(intab, outtab)
pattern = re.compile('\${.*}')