Place the code below into this file: (Inside your local project repo)
.git/hooks/pre-commit
#!/bin/sh
if git rev-parse --verify HEAD >/dev/null 2>&1; then
against=HEAD| #!/bin/bash | |
| # Klassica LetsEncrypt Generate/Autorenew Tool | |
| # Pass an argument: create, renew | |
| DOMAINS=("klassica.com" "www.klassica.com" "blog.klassica.com") | |
| DRY_RUN="--dry-run --staging" # Comment out to run for real! | |
| LE_DIR="/data/site-tools/letsencrypt/" | |
| WEBROOT_DIR="/data/web/klassica.com/" | |
| case "$1" in | |
| # Note: This has to be run each time a subdomain is added or removed! |
| #!/usr/bin/env ruby | |
| USER="arthur" | |
| AWS_KEY="/Users/arthur/.ssh/DevClusters.pem" | |
| CLUSTER_ROLES={ # Build in this order: | |
| nfs: {image: 'ami-a0951573', name: 'devcluster-nfs', secgroups: ['sg-b37b7886','sg-aa7a697f'], count: 1}, | |
| redis: {image: 'ami-10201b69', name: 'devcluster-redis', secgroups: ['sg-b37b7886','sg-aa7a697f'], count: 1}, | |
| databrain: {image: 'ami-8a30206d', name: 'devcluster-databrain', secgroups: ['sg-b37b7886','sg-aa7a697f'], count: 1}, | |
| mysql: {image: 'ami-cc5b10fd', name: 'devcluster-mysql', secgroups: ['sg-b37b7886','sg-aa7a697f'], count: 2}, | |
| mongodb: {image: 'ami-56102071', name: 'devcluster-mongodb', secgroups: ['sg-b37b7886','sg-aa7a697f'], count: 2}, |
| #################################### | |
| ### Rais3 Log Grok (Unicorn and Thin supported at :info level) | |
| ## There are many non-capturing groups. For debugging, change them to named groups and use http://grokconstructor.appspot.com/do/match | |
| # | |
| ## Assumes Rails is prepending :uuid to log lines, with one log per unicorn worker. | |
| ## Assumes the whole request is sent multiline (by Filebeat, not Logstash mulitline plugin) | |
| # | |
| ## Add this to the Filebeat.yml prospector | |
| ## multiline: | |
| # pattern: '\[[a-fA-F0-9]{32}\]( Started |$)' |
| 23.23.192.96 gowatchit.com www.gowatchit.com mrqe.gowatchit.com ebert.gowatchit.com nytimes.gowatchit.com api.gowatchit.com radius.gowatchit.com |
| [Wed, 02 Apr 2014 12:28:12 -0700] INFO: Starting Chef Solo Run | |
| /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.4/lib/chef/node.rb:180:in `method_missing': Attribute default is not defined! (ArgumentError) | |
| from /etc/chef-custom/recipes/cookbooks/main/attributes/default.rb:1:in `from_file' | |
| from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.4/lib/chef/cookbook.rb:73:in `load_attributes' | |
| from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.4/lib/chef/cookbook.rb:71:in `each' | |
| from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.4/lib/chef/cookbook.rb:71:in `load_attributes' | |
| from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.4/lib/chef/compile.rb:61:in `load_attributes' | |
| from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.4/lib/chef/cookbook_loader.rb:107:in `each' | |
| from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.4/lib/chef/cookbook_loader.rb:106:in `each_value' | |
| from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6. |
Place the code below into this file: (Inside your local project repo)
.git/hooks/pre-commit
#!/bin/sh
if git rev-parse --verify HEAD >/dev/null 2>&1; then
against=HEAD| # These two shortcuts allow your media keyboard or mouse's back/forward keys to change windows in screen. | |
| # This is designed to work with tmux or screen (using ctrl+a as the command shortcut) inside a Guake terminal | |
| # You'll also need xdotool installed (aptitude install xdotool) | |
| # Enter these as shortcuts in Ubuntu's "System Settings" > "Keyboard" > "Shortcuts" (tab) > "Custom Shortcuts" | |
| # Previous/Back Key | |
| xdotool search --onlyvisible --name Guake key ctrl+a p | |
| # Next/Forward Key | |
| xdotool search --onlyvisible --name Guake key ctrl+a n |
| // 2024 Update, use URLSearchParams [https://caniuse.com/urlsearchparams] | |
| export function createQueryString2(name: string, value: string, searchParams: any) { | |
| const params = new URLSearchParams(searchParams); | |
| params.set(name, value.toLowerCase()); | |
| return params.toString(); | |
| } | |
| // ---- Original 2012 version, when browsers really sucked ---- | |
| // Explicitly save/update a url parameter using HTML5's replaceState(). |