(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| module.exports = function(grunt) { | |
| grunt.initConfig({ | |
| pkg: grunt.file.readJSON('package.json'), | |
| uglify: { | |
| options: { | |
| sourceMap: true, | |
| sourceMapIncludeSources: true, | |
| sourceMapIn: 'js/app.coffee.js.map' | |
| }, | 
| module.exports = function(grunt) { | |
| grunt.initConfig({ | |
| pkg: grunt.file.readJSON('package.json'), | |
| exec: { | |
| set_max_files: { | |
| command: 'ulimit -n 1024' | |
| }, | |
| get_grunt_sitemap: { | 
| # This script has to be run as a root user | |
| echo "* Updating system" | |
| apt-get update | |
| apt-get -y upgrade | |
| echo "* Installing packages" | |
| apt-get -y install build-essential libmagickcore-dev imagemagick libmagickwand-dev libxml2-dev libxslt1-dev git-core nginx redis-server curl nodejs htop | |
| id -u deploy &> /dev/null | |
| if [ $? -ne 0 ] | 
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| def toCamelCase(String string) { | |
| String result = "" | |
| string.findAll("[^\\W]+") { String word -> | |
| result += word.capitalize() | |
| } | |
| return result | |
| } | |
| afterEvaluate { project -> | |
| Configuration runtimeConfiguration = project.configurations.getByName('compile') | 
| ###################################################### | |
| # Proguard file to remove debug logs and NOT kill the application | |
| # | |
| # @benclayton github.com/benvium 15-12-2014 | |
| # | |
| # https://gist.github.com/benvium/8995326bc944f47f2c64 | |
| ###################################################### | |
| # To use this file, your project's build.gradle 'buildTypes' section should look like this: | |
| # | 
| import android.util.Log; | |
| /** | |
| * @author eefret | |
| * Created by Christopher T. Herrera (eefret) on 4/22/2014 [12:41 AM] | |
| * Wrapper class for android Logging utility will select a tag automatically from class, method and line number executed. | |
| */ | |
| public class Logger { | |
| //TODO Create a detail Enum to define the log detail level. | |
| //TODO Create a method that halt every log possible based on the development mode Ex: (PRODUCTION, DEVELOPMENT, DEBUG) that can manage what can be and can't be logged | 
| import javax.crypto.*; | |
| import javax.crypto.spec.GCMParameterSpec; | |
| import java.nio.ByteBuffer; | |
| import java.security.SecureRandom; | |
| import java.util.Arrays; | |
| public class AESGCMUpdateAAD2 { | |
| // AES-GCM parameters | |
| public static final int AES_KEY_SIZE = 128; // in bits |