start new:
tmux
start new with session name:
tmux new -s myname
#!/usr/bin/env ruby | |
if ARGV[0].nil? || ARGV[0].match(/-h/) | |
puts "Usage : #{$0} github_username dash_sqlite_db char_appended_to_keyword [no_comments]" | |
exit | |
end | |
require 'net/http' | |
require 'open-uri' | |
#require 'awesome_print' |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.
## Gerrit is dumb ## | |
#################### | |
alias gerrit='ssh -p 29418 <wherever you run gerrit> gerrit' | |
# Usage # | |
# gerritIds <project> | |
# will list all change ids by you that are open for <project> | |
# useful to find what ids will will be abandoned by abandonALl | |
gerritIds() { | |
gerrit query --format=JSON --patch-sets -- status:open project:$1 | grep -v runTimeMilliseconds | grep -E "`git config user.email`" | grep -E -o '"number":"\d\d+"' | tr '"' ' ' | cut -d' ' -f4- |
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited | |
# | |
# Current known FCC address ranges: | |
# https://news.ycombinator.com/item?id=7716915 | |
# | |
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft | |
# | |
# In your nginx.conf: | |
location / { |
This gist is no longer in use.
#!/bin/bash | |
# Have to redirect stderr to stdout here because slave.py uses stderr for output. | |
~/bin/slave.py list 2>&1 >/dev/null | grep beaker-slave- | while read slave; do | |
echo | |
echo "Checking status of $slave..." | |
# First, check if we can SSH into the host. If we can, then check the process and maybe shut down. | |
# This makes sure that we don't consider an SSH failure to be reason to shut down the node. | |
if ssh $slave echo < /dev/null; then |
#!groovy | |
# Best of Jenkinsfile | |
# `Jenkinsfile` is a groovy script DSL for defining CI/CD workflows for Jenkins | |
node { | |
} |
global | |
maxconn 2000 | |
stats socket /tmp/haproxy.socket level admin | |
uid 80 | |
gid 80 | |
nbproc 1 | |
chroot /tmp/haproxy_chroot | |
daemon | |
tune.ssl.default-dh-param 2048 | |
# Modern browser compatibility only as mentioned here: |