Skip to content

Instantly share code, notes, and snippets.

View nisrulz's full-sized avatar
🌌
Coding in the MultiVerse

Nishant Srivastava nisrulz

🌌
Coding in the MultiVerse
View GitHub Profile
@nisrulz
nisrulz / .gitignore
Last active November 22, 2015 06:44
.gitignore File for Android Studio
# [Android] ========================
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
# Java class files
*.class
@nisrulz
nisrulz / proguard-rules.pro
Created April 5, 2015 06:14
Android : Proguard Rules for a Library Module
#
# This ProGuard configuration file illustrates how to process a program
# library, such that it remains usable as a library.
# Usage:
# java -jar proguard.jar @library.pro
#
# Save the obfuscation mapping to a file, so we can de-obfuscate any stack
# traces later on. Keep a fixed source file attribute and all line number
# tables to get line numbers in the stack traces.
@nisrulz
nisrulz / gradle.properties
Created April 5, 2015 06:35
Faster Gradle Builds
org.gradle.daemon=true
org.gradle.configureondemand=true
org.gradle.parallel=true
@nisrulz
nisrulz / CustomUncaughtExpHandler.java
Created April 5, 2015 07:03
Android : Custom Uncaught Exception Handler
public class CustomUncaughtExpHandler implements Thread.UncaughtExceptionHandler {
/**
* Method to handle any exception thats not handled in code
*
* @param thread
* @param ex
*/
@Override
public void uncaughtException(Thread thread, Throwable ex) {
Log.e(SP_Defaults.LOGTAG,
@nisrulz
nisrulz / build.gradle
Created April 5, 2015 08:39
Android : Prompt for signing when building for release
signingConfigs {
release {
storeFile file(System.console().readLine("\n\$ Enter keystore path: "))
storePassword new String(System.console().readPassword("\n\$ Enter keystore password: "))
keyAlias System.console().readLine("\n\$ Enter key alias: ")
keyPassword new String(System.console().readPassword("\n\$ Enter key password: "))
}
}
@nisrulz
nisrulz / build.gradle
Created April 5, 2015 20:04
Gradle : build.gradle file for a AAR Module Library Project
apply plugin: 'com.android.library'
android {
signingConfigs {
release {
try {
keyAlias KEYSTORE_ALIAS
keyPassword KEY_PASSWORD
storeFile file(KEYSTORE_FILEPATH)
storePassword KEYSTORE_PASSWORD
@nisrulz
nisrulz / styles.xml
Last active August 29, 2015 14:18
Android : Tint the Navigation Bar
<style name="AppTheme" parent="@style/Theme.AppCompat.Light">
...
<item name="navigationBarColor">#123456</item>
...
<!--Or-->
<item name="android:navigationBarColor" tools:targetApi="21">@android:color/white</item>
</style>
@nisrulz
nisrulz / proguard-rules.pro
Created April 11, 2015 06:31
Proguard rules to strip logs from the android source
-assumenosideeffects class android.util.Log {
public static *** d(...);
}
// MultiExporter.jsx
// Version 0.1
// Version 0.2 Adds PNG and EPS exports
// Version 0.3 Adds support for exporting at different resolutions
// Version 0.4 Adds support for SVG, changed EPS behaviour to minimise output filesize
// Version 0.5 Fixed cropping issues
// Version 0.6 Added inner padding mode to prevent circular bounds clipping
//
// Copyright 2013 Tom Byrne
// Comments or suggestions to tom@tbyrne.org
@nisrulz
nisrulz / get_public_ssh_key.sh
Last active August 29, 2015 14:23
Get SSH Public Key
#More info at : https://help.github.com/articles/generating-ssh-keys/
cat ~/.ssh/id_dsa.pub