Skip to content

Instantly share code, notes, and snippets.


Daniel P dportalesr

Block or report user

Report or block dportalesr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Gemfile
group :development, :test do
gem "guard-livereload", require: false
gem "rack-livereload"

Asset Pipeline

The asset pipeline is implemented by the sprockets-rails gem, and is enabled by default.

You can disable it while creating a new application by passing the --skip-sprockets option. This will generate a config/application.rb with a require to sprockets commented out.

Main features

  1. Concatenate assets into master (.js, .css) files and name them with a SHA256 hash to keep tracking of content changes, improving browser caching management.
  2. Minification or compression.
dportalesr /
Last active Oct 25, 2017 — forked from julianxhokaxhiu/
Simple bash script to create a Bootable ISO from macOS Sierra Install Image from Mac App Store
# Credits to fuckbecauseican5 from
# Adapted to work with the official image available into Mac App Store
# Enjoy!
hdiutil attach /Applications/Install\ macOS\ -noverify -nobrowse -mountpoint /Volumes/install_app
hdiutil create -o /tmp/Sierra.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach /tmp/Sierra.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build


mkdir cool-app
cd cool-app

Usar RVM para crear un gemset para el proyecto con la versión de Ruby deseada.

rvm --create --ruby-version use ruby-2.2.3@cool-app
View gist:3c87af7fd382b4b9cba70c2d1ca2b77d
deny from
deny from
deny from
deny from
View gist:a585d4dc6c6d97ca1692acb366e7d02b

Pry Cheat Sheet

Youtube Tutorial 2013

Command Line

pry -r ./config/app_init_file.rb  —— Load your app into a pry session (look at the file loaded by
pry -r ./config/environemtn.rb    —— Load your rails into a pry session
View gist:7e1e2bb214b516af792d157f154bb960
:external_id => "R612629623",
:shipping => "STANDARD",
:recipient => {
:name => "Chris Dey",
:address1 => "158 Cove Neck Rd.",
:address2 => "",
:city => "Oyster Bay",
:state_code => "NY",
:country_code => "US",
View peripheral-explorer-DEBUG.log
noble addressChange d8:bb:2c:bc:94:e5 +0ms
yosemite-bindings sendCBMsg: 1, {
"kCBMsgArgName": "node-1456372015372",
"kCBMsgArgOptions": {
"kCBInitOptionShowPowerAlert": 0
"kCBMsgArgType": 0
} +5ms
yosemite-bindings xpcEvent: {
"kCBMsgId": 6,
View Git CheatSheet
# Configura metadata de los commits
git config --global "<name>"
git config --global "<email>"
# Habilita la útil colorización del producto de la línea de comando
git config --global color.ui auto
# Agrega una modificación o creación de archivo a Staging
git add <file>
View proxy.rb
Proxy.start(:host => "", :port => 81) do |conn|
conn.server :production, :host => '', :port => 8080
conn.server :ey_cloud, :host => '', :port => 81
conn.on_data do |data|
conn.on_response do |server, resp|
resp if server == :production
You can’t perform that action at this time.