Skip to content

Instantly share code, notes, and snippets.

View dportalesr's full-sized avatar
🇲🇽
🐱👨🏻‍💻💥👾

Daniel P dportalesr

🇲🇽
🐱👨🏻‍💻💥👾
View GitHub Profile
@dportalesr
dportalesr / gist:f46aa4c4fbe03f7a8579d67e90790d98
Created February 14, 2023 05:24
daetherius theme for Mona App (import link; paste in browser)
springThemeSharing://import?theme=YnBsaXN0MDDSAQIDX1V0aGVtZVd2ZXJzaW9u1QQFBgcICQoLSUpSaWRVc3R5bGVfEBBiYWNrZ3JvdW5kQ29sb3JzVG5hbWVfEBBmb3JlZ3JvdW5kQ29sb3JzXxAkMEMzMkNFQjUtREMzOS00RDgwLTk5RUQtQkRBMjQ3NjgxRkQxEALfEBQMDQ4PEBESExQVFhcYGRobHB0eHyAjJScpKy0vMTM1Nzk7PT9BQ0VHXxARcXVvdGVUd2VldE91dGxpbmVdc2Vjb25kYXJ5Q2FyZFxpbWFnZU91dGxpbmVUY2FyZF8QEm5vdGlmaWNhdGlvbk5vcm1hbFlmb2N1c1JpbmdfEBJsaW5rUHJldmlld091dGxpbmVVcGxhaW5abGFyZ2VJbWFnZV8QE25vdGlmaWNhdGlvblN1Y2Nlc3NZc2Vjb25kYXJ5XxAPcmVhZGluZ1Byb2dyZXNzWWJhclNoYWRvd1x0ZXJ0aWFyeUNhcmRac21hbGxJbWFnZVpwb2xsT3B0aW9uVnRocmVhZF8QEW5vdGlmaWNhdGlvbkVycm9yV2dyb3VwZWRZc2VwYXJhdG9y0SEiV3VpQ29sb3JfEBswLjEyNDEgMC4yODIxIDAuNDYwNiAxLjAwMDDRISRfEBswLjEyMTYgMC4yMTE4IDAuMzE3NiAxLjAwMDDRISZfEBswLjEyNTUgMC4yODI0IDAuNDU4OCAxLjAwMDDRIShfEBswLjEwMjAgMC4xNzY1IDAuMjY2NyAxLjAwMDDRISpfEBswLjE0MTIgMC4yNDcxIDAuMzcyNSAxLjAwMDDRISxfEBswLjYxMzEgMC42NTgxIDAuNzA5NSAxLjAwMDDRIS5fEBswLjEyNDEgMC4yODIxIDAuNDYwNiAxLjAwMDDRITBfEBswLjEwMjAgMC4xNTI5IDAuMjE1NyAxLjAwMDDRITJfEBswLjEyNDEgMC4yODIxIDAuNDYwNiAwLjAwMDDRIT
@dportalesr
dportalesr / .credo.exs
Created December 7, 2021 03:33
Credo config file
# This file contains the configuration for Credo and you are probably reading
# this after creating it with `mix credo.gen.config`.
#
# If you find anything wrong or unclear in this file, please report an
# issue on GitHub: https://github.com/rrrene/credo/issues
#
%{
#
# You can have as many configs as you like in the `configs:` field.
configs: [
group :development, :test do
gem "guard-livereload", require: false
gem "rack-livereload"
end
@dportalesr
dportalesr / assetpipeline.md
Created April 26, 2018 00:01
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 October 25, 2017 01:51 — forked from julianxhokaxhiu/create-iso.sh
Simple bash script to create a Bootable ISO from macOS Sierra Install Image from Mac App Store
#!/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
@dportalesr
dportalesr / ruby-on-rails.md
Created September 7, 2017 23:39
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
@dportalesr
dportalesr / gist:3c87af7fd382b4b9cba70c2d1ca2b77d
Created July 24, 2017 05:48
Blacklist Google bot ranges
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

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
@dportalesr
dportalesr / gist:7e1e2bb214b516af792d157f154bb960
Created June 26, 2017 19:44
Printful order R612629623 payload
{
:external_id => "R612629623",
:shipping => "STANDARD",
:recipient => {
:name => "Chris Dey",
:address1 => "158 Cove Neck Rd.",
:address2 => "",
:city => "Oyster Bay",
:state_code => "NY",
:country_code => "US",
@dportalesr
dportalesr / peripheral-explorer-DEBUG.log
Created February 25, 2016 03:50
peripheral-explorer.js DEBUG
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,