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 | |
set -e -o pipefail -u | |
# Launches each Procfile service as a tmux pane in a background window. | |
# The window is created if it doesn't already exist. | |
# Panes are created on demand, and existing panes are restarted if stopped. | |
WINDOW_NAME="poorman" | |
if [[ ${1:-} == "stop" ]]; then |
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
# Please make this file available to others | |
# by sending it to <lirc@bartelmus.de> | |
# | |
# this config file was automatically generated | |
# using lirc-0.9.0-pre1(default) on Sat Dec 7 19:14:59 2013 | |
# | |
# contributed by | |
# | |
# brand: lirc-pda.conf | |
# model no. of remote control: |
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
haystack = { | |
action: "greeting", | |
scope: "world", | |
things: [ | |
{ x: "city" }, | |
{ x: "country" }, | |
{ x: "world" }, | |
] | |
} |
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 | |
set -e -o pipefail -u | |
# Launches each Procfile service as a tmux pane in a background window. | |
# The window is created if it doesn't already exist. | |
# Panes are created on demand, and existing panes are restarted if stopped. | |
WINDOW_NAME="goreman" | |
tmux new-window -adS -n $WINDOW_NAME |
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
## | |
# spec/support/garbage_collection.rb | |
# | |
# Inspired by: | |
# http://www.rubyinside.com/careful-cutting-to-get-faster-rspec-runs-with-rails-5207.html | |
# | |
# At time of writing: | |
# reduces duration from ~16.7sec to ~15.7sec (6% improvement) | |
# increases peak memory usage from 150mb to 200mb (33% increase) |
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 | |
# Initialize MySQL database. | |
# ADD this file into the container via Dockerfile. | |
# Assuming you specify a VOLUME ["/var/lib/mysql"] or `-v /var/lib/mysql` on the `docker run` command… | |
# Once built, do e.g. `docker run your_image /path/to/docker-mysql-initialize.sh` | |
# Again, make sure MySQL is persisting data outside the container for this to have any effect. | |
set -e | |
set -x |
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 -e | |
# Push local changes on the current branch as a new branch, then | |
# reset the local branch back to its remote tracking branch. | |
# | |
# This enables a fast workflow: | |
# 10 `git commit` one or more changes to main. | |
# 20 `git push-as -p new-feature` | |
# 30 goto 10 |
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
PATTERN = %r{ | |
^ | |
(?<indent>\s*) | |
(?<key>\S+): | |
\s* | |
!InlineFile | |
\s* | |
(?<file>.*) | |
$ | |
}x |
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
#!/usr/bin/env ruby | |
# Serve the current directory via HTTP. | |
# Like Python's SimpleHTTPServer, but with no-cache headers. | |
# Default port 8000, specify alternate port as first parameter: | |
# www 3000 | |
# sudo www 80 # (probably a bad idea) | |
# Inspired by http://chrismdp.github.com/2011/12/cache-busting-ruby-http-server/ |
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
source "https://rubygems.org" | |
# ruby web server; run Sidekiq::Web with e.g. `puma --port=80` | |
# https://github.com/puma/puma | |
gem "puma" | |
# provides Sidekiq::Web monitoring UI | |
# https://github.com/mperham/sidekiq/wiki/Monitoring | |
gem "sidekiq", "~> 4.2" |
NewerOlder