A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$ if your browser aliases it:
~ 108 byte version
| class UserProfile < ActiveRecord::Base | |
| has_attached_file :picture, | |
| styles: { | |
| original: {geometry: '1000x0>'}, | |
| thumb: '100x100#', | |
| large: '300x200>', | |
| }, | |
| convert_options: {large: "-quality 80 -strip -interlace Plane"}, | |
| default_url: "http://s3-ap-southeast-1.amazonaws.com/#{ENV["S3_BUCKET"]}/user_profiles/placeholder.png", | |
| path: (Rails.env == 'test' || Rails.env == 'development') ? ":rails_root/public/images/:class/:id/:style/:filename" : "/:class/:id/:style/:filename", | 
| # first: | |
| lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done | |
| sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.* | |
| # To recap, the best way (I've found) to completely uninstall node + npm is to do the following: | |
| # go to /usr/local/lib and delete any node and node_modules | |
| cd /usr/local/lib | |
| sudo rm -rf node* | 
| 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 | 
| 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 | 
| ###################################################### | |
| # 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: | |
| # | 
| def toCamelCase(String string) { | |
| String result = "" | |
| string.findAll("[^\\W]+") { String word -> | |
| result += word.capitalize() | |
| } | |
| return result | |
| } | |
| afterEvaluate { project -> | |
| Configuration runtimeConfiguration = project.configurations.getByName('compile') | 
(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.
| # 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 ] |