start new:
tmux
start new with session name:
tmux new -s myname
| #!/bin/bash -ex | |
| # Paste this into ssh | |
| # curl -sL https://gist.github.com/andsens/2913223/raw/bootstrap_homeshick.sh | tar -xzO | /bin/bash -ex | |
| # When forking, you can get the URL from the raw (<>) button. | |
| ### Set some command variables depending on whether we are root or not ### | |
| # This assumes you use a debian derivate, replace with yum, pacman etc. | |
| aptget='sudo apt-get' | |
| chsh='sudo chsh' |
| This playbook has been removed as it is now very outdated. |
| var cluster = require('cluster'); | |
| var http = require('http'); | |
| var numCPUs = require('os').cpus().length; | |
| if (cluster.isMaster) { | |
| // Fork workers. | |
| for (var i = 0; i < numCPUs; i++) { | |
| cluster.fork(); | |
| } | |
| cluster.on('exit', function(worker, code, signal) { |
| http { | |
| proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:8m max_size=3000m inactive=600m; | |
| proxy_temp_path /var/tmp; | |
| include mime.types; | |
| default_type application/octet-stream; | |
| sendfile on; | |
| keepalive_timeout 65; | |
| gzip on; | |
| gzip_comp_level 6; |
| module DelayedJob | |
| module Matchers | |
| def enqueue_delayed_job(handler) | |
| DelayedJobMatcher.new handler | |
| end | |
| class DelayedJobMatcher | |
| def initialize(handler) | |
| @handler = handler | |
| @attributes = {} |
| # SSL self signed localhost for rails start to finish, no red warnings. | |
| # 1) Create your private key (any password will do, we remove it below) | |
| $ openssl genrsa -des3 -out server.orig.key 2048 | |
| # 2) Remove the password | |
| $ openssl rsa -in server.orig.key -out server.key |
| $stack, $draws = [], {} | |
| def method_missing *args | |
| return if args[0][/^to_/] | |
| $stack << args.map { |a| a or $stack.pop } | |
| $draws[$stack.pop(2)[0][0]] = args[1] if args[0] == :< | |
| end | |
| class Array | |
| def +@ |
| require "rubygems" | |
| require "bundler/setup" | |
| # require your gems as usual | |
| require "fog" | |
| require 'fog/aws/glacier' | |
| aws_access_key_id = "??" |
I just had to set up Jenkins to use GitHub. My notes (to myself, mostly):
For setting up Jenkins to build GitHub projects. This assumes some ability to manage Jenkins, use the command line, set up a utility LDAP account, etc. Please share or improve this Gist as needed.