Skip to content

Instantly share code, notes, and snippets.

@acadet
acadet / Remove From Git By Extension
Created May 5, 2016 09:21 — forked from benzittlau/Remove From Git By Extension
Remove all *.swp files from a git repository
git ls-files | grep '\.swp$' | xargs git rm
@acadet
acadet / Timer.swift
Created January 26, 2016 00:36 — forked from jstn/Timer.swift
simple nanosecond timer using mach_absolute_time
/*
var t = Timer()
t.start()
// do something
t.stop()
println("took \(t.seconds)")
*/
@acadet
acadet / gist:8ffedb8ce9c1f976cd3a
Created December 3, 2015 22:24 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@acadet
acadet / build.gradle
Last active August 29, 2015 14:18 — forked from sddamico/build.gradle
/* put this in your application's build.gradle after the android {} block
* output is in this format: "<projectName>-<buildType>-v<versionName>-<versionCode>.apk"
* e.g. "materiyolo-debug-v5.0.0-12345.apk"
* also, supports injecting jenkins ci's build number into apk, if available
* e.g. "materiyolo-debug-v5.0.0-12345-b6789.apk"
* you must specify your versionName and versionCode in your build.gradle for this to work
* see: http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Manifest-entries */
// change this to whatever your app's name is...
project.archivesBaseName = 'materiyolo'