Skip to content

Instantly share code, notes, and snippets.

View drake1588's full-sized avatar
🎯
Focusing

Alfonso Henriquez drake1588

🎯
Focusing
View GitHub Profile

Keybase proof

I hereby claim:

  • I am drake1588 on github.
  • I am drake1588 (https://keybase.io/drake1588) on keybase.
  • I have a public key ASDtJjKfBleAKCJ0DZWCeajy9KZdbmLl7zR3rMXGOGSY7Ao

To claim this, I am signing this object:

helm init --service-account tiller --override spec.selector.matchLabels.'name'='tiller',spec.selector.matchLabels.'app'='helm' --output yaml | sed 's@apiVersion: extensions/v1beta1@apiVersion: apps/v1@' | kubectl apply -f -
@drake1588
drake1588 / mongo-docker.bash
Created April 7, 2019 20:59 — forked from davideicardi/mongo-docker.bash
Running mongodb inside a docker container (with mongodb authentication)
# Create a container from the mongo image,
# run is as a daemon (-d), expose the port 27017 (-p),
# set it to auto start (--restart)
# and with mongo authentication (--auth)
# Image used is https://hub.docker.com/_/mongo/
docker pull mongo
docker run --name YOURCONTAINERNAME --restart=always -d -p 27017:27017 mongo mongod --auth
# Using the mongo "localhost exception" (https://docs.mongodb.org/v3.0/core/security-users/#localhost-exception)
# add a root user

Pry Cheat Sheet

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/environment.rb - load your rails into a pry session

Debugger

@drake1588
drake1588 / clear-sidekiq-jobs.sh
Created September 12, 2018 14:08 — forked from wbotelhos/clear-sidekiq-jobs.sh
Clear Sidekiq Jobs
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear
# 3. Clear 'Processed' and 'Failed' jobs
@drake1588
drake1588 / gist:df6e066cdc7cf322de4d6178c4f2ae3c
Created August 29, 2018 21:19 — forked from gin1314/gist:3697341
bash: redirection cheat sheet
.---------------------------------------------------------------------------.
| |
| Bash Redirections Cheat Sheet |
| |
+---------------------------------------------------------------------------+
| |
| Created by Peteris Krumins (peter@catonmat.net) |
| www.catonmat.net -- good coders code, great coders reuse |
| |
+-----------------------------.---------------------------------------------+