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"
end
View assetpipeline.md

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
dportalesr / create-iso.sh
Last active Oct 25, 2017 — forked from julianxhokaxhiu/create-iso.sh
Simple bash script to create a Bootable ISO from macOS Sierra Install Image from Mac App Store
View create-iso.sh
#!/bin/bash
#
# Credits to fuckbecauseican5 from https://www.reddit.com/r/hackintosh/comments/4s561a/macos_sierra_16a238m_install_success_and_guide/
# Adapted to work with the official image available into Mac App Store
#
# Enjoy!
hdiutil attach /Applications/Install\ macOS\ Sierra.app/Contents/SharedSupport/InstallESD.dmg -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
View ruby-on-rails.md

Preparación

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 64.18.0.0/20
deny from 66.102.0.0/20
deny from 64.233.160.0/19
deny from 66.249.80.0/20
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 config.ru)
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 user.name "<name>"
git config --global user.email "<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 => "0.0.0.0", :port => 81) do |conn|
conn.server :production, :host => '127.0.0.1', :port => 8080
conn.server :ey_cloud, :host => '204.236.225.141', :port => 81
conn.on_data do |data|
data
end
conn.on_response do |server, resp|
resp if server == :production
end
end
You can’t perform that action at this time.