Skip to content

Instantly share code, notes, and snippets.

@mgamer
mgamer / pre-commit
Last active January 9, 2017 10:35 — forked from DerLobi/pre-commit
Don't commit focused tests. Use this as a pre-commit hook and all staged changes that contain `fdescribe`, `fcontext`, `fit`, `fspecify` or `fexample` will be replaced with `describe`, `context`, `it` or `example`. Copy this file as `pre-commit` into the `.git/hooks` folder of your repository (create it if neccessary) and chmod +x the file.
#!/bin/sh
#adapted from https://gist.github.com/mgamer/132534fe1155fb40adc5adfc58790373
DESCRIBEFILES=$(git diff --staged -G"^\s*fdescribe\(" --name-only | wc -l)
if [ $DESCRIBEFILES -gt 0 ]
then
echo "You forgot to remove a fdescribe in the following files:"
git --no-pager diff --staged --name-only -G"^\s*fdescribe\(" | xargs -L1 -I {} sh -c 'sed -i "" "s/\s*fdescribe(/describe(/g" {}; git add "{}"'
echo "This is fixed automatically now"
@mgamer
mgamer / appcode.vmoptions
Created December 13, 2015 10:08 — forked from garriguv/appcode.vmoptions
AppCode JVM options
-Xss2m
-Xms512m
-Xmx4096m
-XX:NewSize=128m
-XX:MaxNewSize=128m
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=96m
-XX:+UseCompressedOops
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 4.4.2 (https://www.mediafire.com/?qbbt4lhyu9q10ix)
Google Apps for Android 4.3 (http://goo.im/gapps/gapps-jb-20130813-signed.zip)
Google Apps for Android 4.2 (http://goo.im/gapps/gapps-jb-20130812-signed.zip)
Google Apps for Android 4.1 (http://goo.im/gapps/gapps-jb-20121011-signed.zip)