- The -T option tells rails not to include Test::Unit
- The --database=mysql tells rails to include Mysql gem and configs
- The --skip-bundle is self explanatory... rails new myapp -T --skip-bundle --database=mysql
This file contains 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
require "active_support/core_ext/string/multibyte" | |
class TidyBytesInRequest | |
TIDY_BYTES_ENV_KEYS = %w( | |
HTTP_USER_AGENT | |
HTTP_REFERER | |
PATH_INFO | |
QUERY_STRING | |
REQUEST_PATH |
This file contains 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
# | |
function clearDockerContainerLog() { | |
_dirname=$(sudo ls /var/lib/docker/containers/ | grep $1) | |
sudo sh -c "cat /dev/null > /var/lib/docker/containers/$_dirname/$_dirname-json.log" | |
_dirname="" | |
} | |
alias clean-docker-log="clearDockerContainerLog" |
This file contains 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 lspci | |
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09) | |
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) | |
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04) | |
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04) | |
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04) | |
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4) | |
00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b4) | |
00:1c.2 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 3 (rev b4) |
This file contains 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 | |
DIR_ON_HOST=${PWD} | |
APP_NAME=${PWD##*/} | |
echo $DIR_ON_HOST; | |
echo $APP_NAME; | |
docker run --rm -v $(pwd):/app vovimayhem/app-dev:mri-2.2.3 sh -c "gem install rails --no-rdoc --no-ri && rails new ." |
This file contains 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 | |
# Include the app's bin directory to $PATH: | |
export PATH=/usr/src/app/bin:$PATH | |
set -e | |
# The container was invoked without any particular command... we must check if is a new development environment, install whatever we need to install, and then run the default command: | |
if [ -z "$1" ]; then | |
This file contains 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
# App artifacts | |
/_build | |
/db | |
/deps | |
/*.ez | |
# Generate on crash by the VM | |
erl_crash.dump | |
# The config/prod.secret.exs file by default contains sensitive |
This file contains 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
# ssh -N gateway_ssh_server -L local_port:target_server:target_server_port |
This file contains 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
# Make sure you have this file in a folder along with your certs. | |
# Also, keep in mind that the filenames must follow the convention: | |
# - Certificate Authority Certificate must be named "ca.pem" | |
# - Client Certificate must be named "cert.pem" | |
# - Client Key must be named "key.pem" | |
# | |
# Run with `source env.sh` | |
export DOCKER_TLS_VERIFY=1 | |
export DOCKER_CERT_PATH="$(pwd)" | |
export DOCKER_HOST=tcp://your-host-name:2376 |
OlderNewer