Skip to content

Instantly share code, notes, and snippets.

View brennebeck's full-sized avatar

Bernd Rennebeck brennebeck

View GitHub Profile

Keybase proof

I hereby claim:

  • I am brennebeck on github.
  • I am brennebeck (https://keybase.io/brennebeck) on keybase.
  • I have a public key ASCVOL-kHiQ-vtCw9Cb9YNC0QWaA07jF-Gx0K_bV40rSJAo

To claim this, I am signing this object:

@brennebeck
brennebeck / plistmerge.rb
Created January 19, 2017 03:17 — forked from maxigs/plistmerge.rb
Script to merge values from a plist into another file
#!/usr/bin/env ruby
if ARGV.size != 2
puts "Merges Fields from Plist-Files together into a new file"
puts "USAGE: ./plistmerge.rb source-file input-file"
exit
end
# The values for those fields will be migrated from the source to the target file
FieldsToMigrate = %w(latitude longitude)
@brennebeck
brennebeck / osx-for-hackers.sh
Created September 21, 2016 11:35 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
@brennebeck
brennebeck / README.md
Created September 4, 2016 10:20 — forked from joshdover/README.md
Idiomatic React Testing Patterns

Idiomatic React Testing Patterns

Testing React components seems simple at first. Then you need to test something that isn't a pure interaction and things seem to break down. These 4 patterns should help you write readable, flexible tests for the type of component you are testing.

Setup

I recommend doing all setup in the most functional way possible. If you can avoid it, don't set variables in a beforeEach. This will help ensure tests are isolated and make things a bit easier to reason about. I use a pattern that gives great defaults for each test example but allows every example to override props when needed:

@brennebeck
brennebeck / .bash_profile
Created September 2, 2016 10:35 — forked from frnhr/.bash_profile
Show current pyenv python version in bash prompt, and also color virtual envs differently
####
#### pyenv-virtualenv bash prompt customization
####
# pyenv
eval "$(pyenv init -)"
# pyenv-virtualenv:
@brennebeck
brennebeck / nginx-cors.conf
Created July 25, 2016 03:08 — forked from algal/nginx-cors.conf
nginx configuration for CORS (Cross-Origin Resource Sharing), with an origin whitelist, and HTTP Basic Access authentication allowed
#
# A CORS (Cross-Origin Resouce Sharing) config for nginx
#
# == Purpose
#
# This nginx configuration enables CORS requests in the following way:
# - enables CORS just for origins on a whitelist specified by a regular expression
# - CORS preflight request (OPTIONS) are responded immediately
# - Access-Control-Allow-Credentials=true for GET and POST requests
@brennebeck
brennebeck / README.md
Created December 10, 2015 06:55 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
#!/bin/env node
// OpenShift sample Node application
var express = require('express');
var fs = require('fs');
/**
* Define the sample application.
*/
var SampleApp = function() {