Skip to content

Instantly share code, notes, and snippets.

@daanpeer
daanpeer / gist:4656236
Created January 28, 2013 15:13
Coffeescript autocompile
coffee --watch --compile --output compiled/ */
vmartisan() {
vagrant ssh -c 'php /var/www/{projectname}/artisan '$1
}
alias vmart=vmartisan
#!/bin/bash
PASSPHRASE="" duplicity --exclude ~/VirtualBox\ VMs/ --encrypt-key 20DE745F ~/ file:///Volumes/webdav/backup
#!/bin/sh
# Add git branch if relevant
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
# Extact tracker abbreviation and ticket number (e.g. DS-123)
parse_git_tracker_and_ticket() {
parse_git_branch | grep -e '[A-Z]\+-[0-9]\+' -o
export const fetchAddress = (
fieldName: string,
): Function =>
async (dispatch, getState) => {
const state = getState();
const zipcode = selector(state, `${fieldName}.zipcode`);
const housenumber = selector(state, `${fieldName}.housenumber`);
if (!zipcode || !housenumber) {
return;
@daanpeer
daanpeer / benchmark.sh
Last active March 5, 2018 21:07
Docker benchmark
#!/bin/bash
# The path to write results to
benchmark_dir='./benchmarkResults/';
# use this to check the final results
result_filename='results.txt';
# Use this to tail the progress of the containers
output_filename='output.txt';
# The command to run in the container
docker_command='listo npm run jest';
code --install-extension abusaidm.html-snippets
code --install-extension aeschli.vscode-css-formatter
code --install-extension chenxsan.vscode-standardjs
code --install-extension christian-kohler.npm-intellisense
code --install-extension christian-kohler.path-intellisense
code --install-extension dbaeumer.vscode-eslint
code --install-extension eg2.tslint
code --install-extension esbenp.prettier-vscode
code --install-extension flowtype.flow-for-vscode
@daanpeer
daanpeer / Vscode settings
Created September 1, 2018 16:18
VSCode settings
{
// "editor.formatOnSave": false,
// Enable per-language
"[javascript]": {
"editor.formatOnSave": false
},
"standard.enable": false,
// "prettier.semi": false,
// "prettier.eslintIntegration": true,
// "prettier.sineleQuote": true,