https://www.x.org/releases/X11R7.7/doc/libX11/i18n/compose/en_US.UTF-8.html
$ setxkbmap -option # clear option
$ setxkbmap -model pc105 -layout us -option compose:ralt,caps:ctrl_modifier,shift:both_capslock
SELECT | |
schema_name, rel_name, table_size, | |
pg_size_pretty(table_size) AS size | |
FROM ( | |
SELECT | |
nspname AS schema_name, | |
relname AS rel_name, | |
pg_table_size(pg_class.oid) AS table_size | |
FROM pg_class, pg_namespace | |
WHERE pg_class.relnamespace = pg_namespace.oid |
https://www.x.org/releases/X11R7.7/doc/libX11/i18n/compose/en_US.UTF-8.html
$ setxkbmap -option # clear option
$ setxkbmap -model pc105 -layout us -option compose:ralt,caps:ctrl_modifier,shift:both_capslock
#!/bin/sh | |
set -e | |
APP_PATH="$HOME/apps/openfoodnetwork" | |
CURRENT_PATH="/home/openfoodnetwork/apps/openfoodnetwork/current" | |
SHARED_PATH="/home/openfoodnetwork/apps/openfoodnetwork/shared" | |
CONFIG_PATH="/home/openfoodnetwork/apps/openfoodnetwork/shared/config" | |
BUNDLE="$HOME/.rbenv/shims/bundle" | |
GEM_PATH="/home/openfoodnetwork/.gem" |
#!/bin/sh | |
# Set up Rails app. Run this script immediately after cloning the codebase. | |
# Exit if any subcommand fails | |
set -e | |
# Copy over configs | |
if ! [ -f .env ]; then | |
cp .sample.env .env |
Using py.test is great and the support for test fixtures is pretty awesome. However, in order to share your fixtures across your entire module, py.test suggests you define all your fixtures within one single conftest.py
file. This is impractical if you have a large quantity of fixtures -- for better organization and readibility, you would much rather define your fixtures across multiple, well-named files. But how do you do that? ...No one on the internet seemed to know.
Turns out, however, you can define fixtures in individual files like this:
tests/fixtures/add.py
import pytest
@pytest.fixture
Spoiler alert: Readers win.
@ivar
might not exist and nothing will fail ivar
will complain.alias_method_chain
edSELECT bl.pid AS blocked_pid, | |
a.usename AS blocked_user, | |
ka.query AS blocking_statement, | |
now() - ka.query_start AS blocking_duration, | |
kl.pid AS blocking_pid, | |
ka.usename AS blocking_user, | |
a.query AS blocked_statement, | |
now() - a.query_start AS blocked_duration | |
FROM pg_catalog.pg_locks bl | |
JOIN pg_catalog.pg_stat_activity a ON a.pid = bl.pid |
https://devcenter.heroku.com/articles/custom-domains http://thenomadicfreelancer.blogspot.com/2012/08/pointing-godaddy-domain-to-your-heroku.html
For each custom subdomain use domains:add
in the Terminal.
#!/usr/bin/env bash | |
# | |
# This is sp, the command-line Spotify controller. It talks to a running | |
# instance of the Spotify Linux client over dbus, providing an interface not | |
# unlike mpc. | |
# | |
# Put differently, it allows you to control Spotify without leaving the comfort | |
# of your command line, and without a custom client or Premium subscription. | |
# |