Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Maximilian Bosch Ma27

I may be slow to respond.
View GitHub Profile
adisbladis / zoom-us.nix
Created Aug 1, 2019
Run Zoom in Xephyr
View zoom-us.nix
{ pkgs ? import <nixpkgs> {} }:
xinitRc = pkgs.writeScript "zoom-xinitrc" ''
${pkgs.zoom-us}/bin/zoom-us &
exec ${pkgs.icewm}/bin/icewm
omegahm /
Created Apr 7, 2015
Create Gtihub labels from Bash
#!/usr/bin/env bash
# Colours picked from
# Label definitions
declare -A LABELS
# Platform
beberlei / MyWebTestCase.php
Created Sep 17, 2011
Easily Inject authenticated Symfony User into functional test
View MyWebTestCase.php
use Liip\FunctionalTestBundle\Test\WebTestCase;
use Symfony\Component\HttpKernel\Profiler\Profiler;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Symfony\Component\Security\Core\User\UserInterface;
* @group functional
chrisroos /
Created Sep 9, 2011
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/
# or, instead of backing up trustdb...
Ocramius / Rand.php
Created Apr 14, 2011
MySQL RAND() function in Doctrine2 DQL
View Rand.php
namespace My\Custom\Doctrine2\Function;
* RandFunction ::= "RAND" "(" ")"
class Rand extends FunctionNode
public function parse(\Doctrine\ORM\Query\Parser $parser)