Skip to content

Instantly share code, notes, and snippets.

View taig's full-sized avatar

Niklas Klein taig

View GitHub Profile
@pfn
pfn / build.sbt
Created April 26, 2012 21:46
sbt configuration for testing with robolectric
import AndroidKeys._
libraryDependencies ++= Seq(
"com.pivotallabs" % "robolectric" % "1.1" % "test",
"junit" % "junit" % "4.8.2" % "test",
"xpp3" % "xpp3" % "1.1.4c" % "test",
"org.scalatest" %% "scalatest" % "1.7.1" % "test"
)
seq(androidBuildSettings: _*)
@jjt
jjt / compile.sh
Created June 1, 2012 17:55
Example: Running multiple background processes in one bash script, killing all on SIGINT (ctrl+c)
#!/bin/bash
SITE=/home/dev/sites/rmx
# Arbitrary shell commands, some run in background
echo "RMX using siteroot=$SITE"
$SITE/rmx/manage.py runserver &
compass watch $SITE/media/compass/ &
coffee -o $SITE/media/js -cw $SITE/media/coffee &
hamlpy-watcher $SITE/templates/hamlpy $SITE/templates/templates &
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active May 29, 2024 14:52
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.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@malarkey
malarkey / Contract Killer 3.md
Last active May 24, 2024 23:38
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@pfn
pfn / build.scala
Last active December 21, 2015 02:49
Load an arbitrary project from git, include it as an Android Library Project in our main application build.
import sbt._
import android.ArbitraryProject
object SampleBuild extends Build {
import android.Keys._
import android.Dependencies.LibraryProject
// we're gonna pull tag android-sdk-support_r11 from the support repo
val supportGit = uri("https://android.googlesource.com/" +
@pfn
pfn / build.sbt
Created October 18, 2013 22:39
example build.sbt for a single project with many library projects
import android.Keys._
android.Plugin.androidBuild
name := "project-with-lib-projects"
unmanagedClasspath in Compile <<= ( baseDirectory
, unmanagedClasspath in Compile) map {
(base,cp) =>
val ignores = Set("android-support-v4.jar", "guava-14.0.1.jar")
@staltz
staltz / introrx.md
Last active May 30, 2024 18:43
The introduction to Reactive Programming you've been missing
@chrisbanes
chrisbanes / SystemUiHelper.java
Last active March 2, 2024 18:57
SystemUiHelper
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@mrbobbytables
mrbobbytables / init-boot2docker.sh
Created November 11, 2014 11:48
boot2docker OSX mount helper
#!/bin/bash
set -o errexit -o nounset -o pipefail
usage() {
cat << EOF
USAGE:
init-boot2docker.sh -p [path] -u [uid] -g [gid]
-p Path to the working directory you wish to mount.
-u The uid you wish to mount the working directory as.

Git Cheat Sheet

Commands

Getting Started

git init

or