- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
- They are the people who get things done. Effective Engineers produce results.
# MySQL. Versions 4.1 and 5.0 are recommended. | |
# | |
# Install the MySQL driver: | |
# gem install mysql2 | |
# | |
# And be sure to use new-style password hashing: | |
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html | |
development: | |
adapter: mysql2 | |
encoding: utf8 |
sudo apt-get build-dep ruby1.9.1 | |
wget -c http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p247.tar.gz | |
tar xzf ruby-2.0.0-p247.tar.gz | |
cd ruby-2.0.0-p247 | |
./configure | |
make | |
sudo checkinstall -y --pkgversion 2.0.0-p247 --provides "ruby-interpreter" |
# Check if remote file exists | |
def remote_file_exists?(full_path) | |
'true' == capture("if [ -e #{full_path} ]; then echo 'true'; fi").strip | |
end | |
# Check if process is running | |
def remote_process_exists?(pid_file) | |
capture("ps -p $(cat #{pid_file}) ; true").strip.split("\n").size == 2 | |
end |
sphinx: bundle exec rake ts:run_in_background |
# unicorn | |
description "unicorn ruby app server" | |
start on (local-filesystems and net-device-up IFACE=lo and runlevel [2345]) | |
stop on runlevel [!2345] | |
env WORKDIR=/data | |
env PIDFILE=/data/tmp/pids/unicorn.pid | |
env CFGFILE=/data/config/unicorn.rb |
--DDL - Criando tabelas | |
CREATE TABLE IF NOT EXISTS cliente ( | |
id INTEGER PRIMARY KEY AUTOINCREMENT, | |
nome TEXT NOT NULL, | |
cpf TEXT NOT NULL UNIQUE, | |
ativo BOOLEAN DEFAULT TRUE, | |
data_criacao DATETIME NOT NULL DEFAULT (datetime('now','localtime')) | |
); | |
CREATE TABLE IF NOT EXISTS conta ( |
This is a quick guide on how to setup dm_crypt under WSL2 for working with encrypted volumes. I use an encrypted volume to store things like password recovery codes and 2nd factor backup codes etc. I recently switched over to using WSL2 and wanted to figure out how to enable this functionality there. This is the distilled howto for getting it to work.
First thing you have to do is create a custom WSL2 kernel. Inside your already installed and running WSL2 (ubuntu) installation: