Skip to content

Instantly share code, notes, and snippets.

View micha149's full-sized avatar

Michael van Engelshoven micha149

  • Brainbits GmbH
  • Sankt Augustin, Germany
View GitHub Profile
@micha149
micha149 / gist:2692968
Created May 14, 2012 09:40
Filter versioned files by their revision in svn
# svn status --verbose Lists all files and their revisions
# sed "s/^[^0-9]*//g" strips all status characters and spaces on the left site of the revision
# awk '{ print $1 }' extracts the first column
# sort -u consolidates the unique revisions
svn status --verbose | sed "s/^[^0-9]*//g" | awk '{ print $1 }' | sort -u
@micha149
micha149 / 000-default.conf
Created July 2, 2012 11:36
My prefered apache configuration for a local devhost
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
@micha149
micha149 / javascripaabbtr.js
Created September 4, 2012 14:03
AABB-Tree in javascript
/**
* This file contains an implementation of an Axis Aligned Bounding Box Tree, by Eyal Shalev
* You can modify it and use it for your projects without any limitations.
* I only ask that:
* 1. You leave this message in the Code.
* 2. Drop me a message that you used it via: https://sourceforge.net/projects/javascripaabbtr/
*
* This file will work as is with no requirements to include other files along-side it.
*
* See example usage in aabbTreeExample.html
@micha149
micha149 / jsonview.css
Created September 28, 2012 08:33
Solarized Dark Color Theme for Google Chromes JSON View
body {
white-space: pre;
font-family: "Espresso Sans Mono", monospace;
font-size: 14px;
background: #002b36;
color: #657b83;
}
.property {
font-weight: normal;
@micha149
micha149 / gist:6523387
Last active December 22, 2015 19:59
Git: Remove untracked files
git status --porcelain -u | grep -E '^\?\?' | sed -e 's/^\?? //' | xargs rm -rf
@micha149
micha149 / FindEntityByAssociationCommand.php
Last active August 18, 2022 21:37
Example command to get all entity association mappings. #symfony2 #doctrine2
<?php
namespace Esel\ContentBundle\Command;
use Doctrine\ORM\Mapping\ClassMetadata;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
{
"vars": {
"@gray-darker": "lighten(#000, 13.5%)",
"@gray-dark": "lighten(#000, 20%)",
"@gray": "lighten(#000, 33.5%)",
"@gray-light": "lighten(#000, 60%)",
"@gray-lighter": "lighten(#000, 93.5%)",
"@brand-primary": "#0092dd",
"@brand-success": "#5cb85c",
"@brand-info": "#5bc0de",
@micha149
micha149 / Brötchen.md
Last active May 5, 2017 08:32
Hamburger

Hamburger Brötchen

  • 150ml Wasser
  • 1 Würfel Frische Hefe
  • 40g Butter
  • 1 Ei
  • 435g Mehl
  • 40g Zucker
  • 1 TL Salz
  • Kondensmilch
@micha149
micha149 / _main.scss
Last active August 29, 2015 14:15
Exclude Mobile CSS into separate stylesheet
@import "mixins";
body {
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.container {
width: 960px;
margin: 0 auto;
@micha149
micha149 / example.js
Created August 31, 2015 08:19
Javascript Promises + ES6 arrow functions = ♥
return repo.getHeadCommit()
.then(commit => commit.getTree())
.then(tree => tree.getEntry('bla/foo/bar'))
.then(entry => entry.getTree())
.then(tree => makeThings(repo, tree))