This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| I use the first | |
| —– BEGIN LICENSE —– | |
| Michael Barnes | |
| Single User License | |
| EA7E-821385 | |
| 8A353C41 872A0D5C DF9B2950 AFF6F667 | |
| C458EA6D 8EA3C286 98D1D650 131A97AB | |
| AA919AEC EF20E143 B361B1E7 4C8B7F04 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # bundle open railties | |
| # place in railties/lib/rails/initializable.rb | |
| def run_initializers(group=:default, *args) | |
| return if instance_variable_defined?(:@ran) | |
| t0 = Time.now | |
| initializers.tsort.each do |initializer| | |
| t = Time.now | |
| initializer.run(*args) if initializer.belongs_to?(group) | |
| puts("%60s: %.3f sec" % [initializer.name, Time.now - t]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get install virtualbox | |
| curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-amd64 && chmod +x minikube | |
| sudo cp minikube /usr/local/bin && rm minikube | |
| curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - | |
| echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list | |
| sudo apt-get update | |
| sudo apt-get install kubectl | |
| source <(kubectl completion bash) | |
| echo "source <(kubectl completion bash)" >> ~/.bashrc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| array=(/home/iaan/workspaces/api /home/iaan/workspaces/web /home/iaan/workspaces/management /home/iaan/workspaces/logger /home/iaan/workspaces/translator /home/iaan/workspaces/router ) | |
| for project_path in "${array[@]}" | |
| do | |
| echo $project_path | |
| cd $project_path | |
| # current_branch="$(git symbolic-ref --short -q HEAD)" | |
| echo $current_branch | |
| git stash | |
| git checkout master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get install git curl mysql-client redis rabbitmq-server libmagick++-dev | |
| #Workspaces | |
| cd ~/ | |
| mkdir workspaces | |
| cd workspaces | |
| #Generate ssh keys and add it to git. | |
| #Do not skip this step never use https git links. (Entering password everytime takes forever) | |
| #https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/ |