As configured in my dotfiles.
start new:
tmux
start new with session name:
As configured in my dotfiles.
start new:
tmux
start new with session name:
| #!/bin/bash | |
| # Might as well ask for password up-front, right? | |
| sudo -v | |
| # Keep-alive: update existing sudo time stamp if set, otherwise do nothing. | |
| while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & | |
| # Example: do stuff over the next 30+ mins that requires sudo here or there. | |
| function wait() { |
| #!/bin/bash | |
| HOSTS=(PUT, YOUR, HOSTS, HERE) | |
| CMD="tail -f logs/api.log" | |
| echo "Hit CTRL-C to stop" | |
| sleep 0.5 | |
| PIDS="" | |
| for host in ${HOSTS[*]} | |
| do |
| import time | |
| import datetime | |
| from OpenSSL import crypto as c | |
| from checks import AgentCheck | |
| class SSLCheckExpireDays(AgentCheck): | |
| def check(self, instance): | |
| metric = "ssl.expire_in_days" | |
| certfile = instance['cert'] | |
| cert_tag = 'cert:%s' % (certfile.split('/')[-1:],) |
| $ErrorActionPreference = "Stop" | |
| Set-StrictMode -Version Latest | |
| $Script:PackageManager = $null | |
| function Initialize-NuGetPackageManager | |
| { | |
| [CmdletBinding()] | |
| param ( | |
| [hashtable] $Repositories = @{}, |
| #! /bin/sh -e | |
| # See | |
| # http://blog.docker.com/2014/06/why-you-dont-need-to-run-sshd-in-docker/ | |
| # https://github.com/jpetazzo/nsenter | |
| case "$1" in | |
| -h|--help) | |
| echo "Usage: docker-enter CONTAINER" | |
| exit 0 |
| .SILENT: | |
| .PHONY: help | |
| # Based on https://gist.github.com/prwhite/8168133#comment-1313022 | |
| ## This help screen | |
| help: | |
| printf "Available targets\n\n" | |
| awk '/^[a-zA-Z\-\_0-9]+:/ { \ | |
| helpMessage = match(lastLine, /^## (.*)/); \ |
| #!/bin/bash | |
| APPNAME=<%= appName %> | |
| APP_PATH=/opt/$APPNAME | |
| BUNDLE_PATH=$APP_PATH/current | |
| ENV_FILE=$APP_PATH/config/env.list | |
| PORT=<%= port %> | |
| USE_LOCAL_MONGO=<%= useLocalMongo? "1" : "0" %> | |
| # remove previous version of the app, if exists |
| function decode-authorization-failure-message { | |
| if [ $# -ne 1 ] || [ "$1" = -h ] || [ "$1" = --help ]; then | |
| cat <<'EOT' | |
| Usage: decode-authorization-failure-message <message> | |
| Use this when Amazon gives you an "Encoded authorization failure message" and | |
| you need to turn it into something readable. | |
| EOT | |
| return 1 | |
| fi |