This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// always rebuild our build config | |
tasks.whenTaskAdded { task -> | |
if (task.name ==~ /generate[\w\W]+BuildConfig/) { | |
task.dependsOn "clean" + task.name.capitalize() | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private byte[] junk = new byte[10*1024*1024]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// the flag Base64.NO_WRAP is essential | |
public String generateBasicAuthString() { | |
return "Basic " + Base64.encodeToString(String.format("%s:%s", Utils.deobfuscate(BuildConfig.USER), Utils.deobfuscate(BuildConfig.PW)).getBytes(), Base64.URL_SAFE | Base64.NO_WRAP); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.fontspace.com/backpacker/bpdots |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export ANDROID_HOME=/Applications/AndroidStudio.app/sdk | |
export PATH=$HOME/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$PATH | |
source git-completion.bash | |
# add current git branch to prompt | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
export PS1="\[\033[00m\]\u@\h\[\033[01;34m\] \W \[\033[31m\]\$(parse_git_branch) \[\033[00m\]$\[\033[00m\] " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.12.+' | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.12.+' | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create the Global class in your /app folder root package: | |
import play.api.{GlobalSettings, Play} | |
import play.api.Play.current | |
import play.api.mvc._ | |
import scala.concurrent.Future | |
import scala.concurrent.ExecutionContext.Implicits.global | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Assuming we have some object with properties and methods | |
*/ | |
var me = { | |
first_name: 'Ahikar', | |
last_name: 'Grilka', | |
race: 'Klingon', | |
email: 'AhikarGrilka@jourrapide.com', | |
occupation: 'Commander of Defence', | |
greet: function(other_person){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.github.aselab.activerecord.{PlayConfig, ActiveRecordTables} | |
import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach} | |
import play.api.Play | |
import play.api.test.FakeApplication | |
trait ActiveRecordAutoRollback extends BeforeAndAfterEach with BeforeAndAfterAll { | |
self: ApiBaseSpec => | |
def schema: Seq[ActiveRecordTables] = Seq(ActiveRecordTables.find("models.Tables")) |
OlderNewer