gem "puma"
change to project directory
bundle install
<?php | |
$countries = | |
array( | |
"AF" => "Afghanistan", | |
"AL" => "Albania", | |
"DZ" => "Algeria", | |
"AS" => "American Samoa", | |
"AD" => "Andorra", | |
"AO" => "Angola", |
#!/bin/bash | |
set -e | |
echo "> Removing certificate" | |
sudo security delete-certificate -c localhost || true | |
echo "> Generating .key" | |
sudo openssl genrsa -out config/localhost.key 4096 |
If you're trying to install the postgresql gem pg
and it is failing with the following error message:
Installing pg 1.2.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: ~/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/pg-1.2.3/ext
~/.rbenv/versions/3.0.0/bin/ruby -I ~/.rbenv/versions/3.0.0/lib/ruby/3.0.0 -r ./siteconf20210125-97201-pycpo.rb extconf.rb
This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
ruby '2.7.1' | |
gem 'rails', github: 'rails/rails' | |
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
# Action Text | |
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
gem 'okra', github: 'basecamp/okra' | |
# Drivers |
ruby '2.7.1' | |
gem 'rails', github: 'rails/rails' | |
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
# Action Text | |
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
gem 'okra', github: 'basecamp/okra' | |
# Drivers |
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the \
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)require 'pathname' | |
require 'open3' | |
require 'mini_magick' | |
SRC_DIR = '/path/to/src/dir/'.freeze | |
TMP_DIR = '/path/to/tmp/dir/'.freeze | |
class TextReader | |
def initialize(input_path, output_path) | |
@input_path = input_path |
require 'pathname' | |
require 'open3' | |
require 'mini_magick' | |
SRC_DIR = '/path/to/src/dir/'.freeze | |
TMP_DIR = '/path/to/tmp/dir/'.freeze | |
class TextReader | |
def initialize(input_path, output_path) | |
@input_path = input_path |