- using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
- using inventory:
127.0.0.1 ansible_connection=local
#Resource reference: https://docs.omniref.com/github/veracross/active_merchant/HEAD/symbols/ActiveMerchant::Billing::GmoGateway#line=46 | |
# The API does not return error messages, so I translated these from the | |
# example english-like messages in the GMO documentation | |
ERROR_CODES = { | |
'E01010001' => 'Shop ID not specified', | |
'E01010008' => 'Shop ID contains invalid characters or is too long', | |
'E01010010' => 'Shop ID is invalid', | |
'E01020001' => 'Shop Password not specified', | |
'E01020008' => 'Shop Password contains invalid characters or is too long', | |
'E01030002' => 'Shop ID and Password are invalid', |
ansible-playbook --connection=local 127.0.0.1 playbook.yml
127.0.0.1 ansible_connection=local
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env | |
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced | |
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start | |
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running. | |
# Add the following to your shell init to set up gpg-agent automatically for every shell | |
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then | |
source ~/.gnupg/.gpg-agent-info | |
export GPG_AGENT_INFO | |
else |
add_header Strict-Transport-Security "max-age=10886400; includeSubDomains; preload";
Waveguide theory
Circular waveguide cutoff frequency equation for TE11 mode
fc = 1.8412 c / 2 pi a = 1.8412 c / pi D
In .gitattributes (alongside .gitignore in top repo dir) add: | |
*.mo diff=mo2po | |
In .git/config add (msgunfmt converts an mo to a po file): | |
[diff "mo2po"] | |
textconv = msgunfmt | |
More info at https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes#Binary-Files |
# OSX for Hackers (Mavericks/Yosemite) | |
# | |
# Source: https://gist.github.com/brandonb927/3195465 | |
#!/bin/sh | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Ask for the administrator password upfront |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
# For each database: | |
ALTER DATABASE database_name CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; | |
# For each table: | |
ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | |
# For each column: | |
ALTER TABLE table_name CHANGE column_name column_name VARCHAR(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | |
# (Don’t blindly copy-paste this! The exact statement depends on the column type, maximum length, and other properties. The above line is just an example for a `VARCHAR` column.) |