- Weekly Agenda (created on a different day, and embedded with
/Block Reference
) - [[Morning Questions]]
- {{[[slider]]}} How many hours of sleep did I get?
- What's one thing top of mind today?
- What's the one thing I need to get done today to make progress?
- Review #[[Index: Questions]] #values
- Agenda
- {{[[TODO]]}} Morning walk #goal-health #habit
- {{[[TODO]]}} Check calendar for scheduled events
- {{[[TODO]]}} Morning focus hour
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
while true; do date; sleep 5; done |
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
# Assumes the database container is named 'db' | |
DOCKER_DB_NAME="$(docker-compose ps -q db)" | |
DB_HOSTNAME=db | |
DB_USER=postgres | |
LOCAL_DUMP_PATH="path/to/local.dump" | |
docker-compose up -d db | |
docker exec -i "${DOCKER_DB_NAME}" pg_restore -C --clean --no-acl --no-owner -U "${DB_USER}" -d "${DB_HOSTNAME}" < "${LOCAL_DUMP_PATH}" | |
docker-compose stop db |
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
gem 'elasticsearch', '>= 1.0.15' | |
gem 'elasticsearch-model' | |
gem 'elasticsearch-rails' | |
gem 'patron' | |
gem 'faraday_middleware-aws-signers-v4' | |
gem 'searchkick' |
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 | |
touch /tmp/Recent.xyz | |
while true | |
do | |
echo "Checking again..." | |
wget -q https://apt.dockerproject.org/repo/dists/ubuntu-xenial/main/binary-amd64/InRelease -O /tmp/InRelease.xyz | |
if test /tmp/InRelease.xyz -nt Recent.xyz; then | |
mplayer /usr/share/sounds/ubuntu/stereo/phone-incoming-call.ogg |
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
--- | |
# Patches openssl problem and restarts needed services | |
- name: Apply common configration to all nodes | |
hosts: all | |
sudo: yes | |
# Uncomment to apply update one server at a time | |
# serial: 1 | |
tasks: | |
- name: "Install packages and update cache" |
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/sh | |
# | |
# Patches and installs Ruby to expose OpenSSL context options, using rbenv. | |
# | |
# Based on http://philippe.bourgau.net/how-to-install-a-patched-ruby-interpreter-wit/ | |
# | |
VERSION=2.1.6 | |
PATCH_URL="https://bugs.ruby-lang.org/attachments/download/4210/0001-Expose-the-SSLContext-options-attribute-in-Net-HTTP.patch" | |
PATCH_NAME=ssloptions |
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
# Capistrano 2 | |
before "deploy", "friday:good_luck" | |
namespace :friday do | |
friday_jumper = %{ | |
┓┏┓┏┓┃ | |
┛┗┛┗┛┃⟍ ○⟋ | |
┓┏┓┏┓┃ ∕ Friday | |
┛┗┛┗┛┃ノ) |
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
# References | |
# http://en.wikipedia.org/wiki/Bank_card_number | |
# http://en.wikipedia.org/wiki/Luhn_algorithm | |
def valid_credit_card?(number) | |
number = number.to_s.gsub(/\D/, "") | |
return false unless valid_association?(number) | |
number.reverse! |
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 'prawn' | |
require 'prawn/measurements' | |
# I have a small collection of links to the resources I used to figure all | |
# this out: http://pinboard.in/u:fidothe/t:pdfx | |
module PDFX | |
class PageBox | |
include Prawn::Measurements | |
attr_reader :bleed_mm |
NewerOlder