Skip to content

Instantly share code, notes, and snippets.

@shnjp
shnjp / tunnel.py
Created March 5, 2011 06:29
ssh tunnel for Fabric
"""
Fabric tunneling utilities
by shn@glucose.jp
class ForwardServer and relates things are refere Robey Pointer's paramiko example.
(http://bazaar.launchpad.net/~robey/paramiko/trunk/annotate/head%3A/demos/forward.py)
usage::
with make_tunnel('user@192.168.0.2:10022') as t:
@Twitchtastic
Twitchtastic / Gitorious install ubuntu
Created March 9, 2011 02:11
Gitorious install script for ubuntu
#!/bin/sh
# This script expects to run as root
# ONLY CHANGE THIS PART
export SERVER_NAME=git.minnesofa.com
export GITORIOUS_REPO=git://gitorious.org/gitorious/akitaonrails-gitorious.git
# DO NOT CHANGE THIS PART
export DEBIAN_FRONTEND=noninteractive
@cedricwalter
cedricwalter / example
Created January 18, 2012 21:52
Nginx configuration for JIRA, TeamCity, Nexus or any other Tomcat web application
## Server configuration for nginx to host Atlassian Jira / Jetbrain TeamCity or any other Tomcat web application
#
# author cedric.walter, www.waltercedric.com
# to be saved for ex in /etc/nginx/sites-available/example
server {
listen 80;
server_name jira.example.com;
access_log off;
location / {
@MarkRose
MarkRose / reuse_agent.sh
Last active September 11, 2023 06:42
Reuse existing ssh-agent or start a new one
# Reuse an existing ssh-agent on login, or create a new one. Append this to your .bashrc
# I have no idea who the author of the original concept was for reusing agents. This
# version also handles the case where the agent exists but has no keys.
GOT_AGENT=0
for FILE in $(find /tmp/ssh-* -type s -user ${LOGNAME} -name "agent.[0-9]*" 2>/dev/null)
do
SOCK_PID=${FILE##*.}
@daicham
daicham / gist:1955543
Created March 2, 2012 04:04
Print the methods of Jenkins inner object on script console
//all job name
jenkins.model.Jenkins.instance.items.each {
println "Job: ${it.name}"
}
//method list of Jenkins instance
jenkins.model.Jenkins.instance.class.methods.each {
println "Jenkins method: ${it.name}"
}
@MicahElliott
MicahElliott / rbenv-howto.md
Created April 17, 2012 18:11
Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

This guide enables you to install (ruby-build) and use (rbenv) multiple versions of ruby, isolate project gems (gemsets and/or bundler), and automatically use appropriate combinations of rubies and gems.

TL;DR Demo

# Ensure system is in ship-shape.

aptitude install git zsh libssl-dev zlib1g-dev libreadline-dev libyaml-dev

@Luzifer
Luzifer / usproxy_wor53.json
Created May 13, 2012 14:45
AWS Cloudformation template to create a running OpenVPN server in AWS US
{
"Description" : "Template to create a US proxy server",
"Parameters" : {
"KeyName" : {
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances",
"Type" : "String"
},
"VPNServerPort" : {
"Description" : "TCP/IP port of the OpenVPN server",
"Type" : "String",
@benclark
benclark / default.vcl
Created May 14, 2012 17:17
Varnish config file w/ basic auth
backend default {
.host = "127.0.0.1";
.port = "8080";
.connect_timeout = 600s;
.first_byte_timeout = 600s;
.between_bytes_timeout = 600s;
}
acl purge {
"localhost";
@netaustin
netaustin / fabric.py
Created May 21, 2012 03:47
Fabric SSH Tunnel
from fabric.api import *
from fabric.contrib.console import confirm
from local_settings import remote_user
from time import time
import subprocess, shlex, atexit, time
from settings import DATABASES
from os import remove
env.use_ssh_config = True
env.context = 'local'
@spikegrobstein
spikegrobstein / nginx.conf
Last active September 22, 2023 04:19
nginx config for proxying requests for plex over a hostname-based virtualhost.
upstream plex-upstream {
# change plex-server.example.com:32400 to the hostname:port of your plex server.
# this can be "localhost:32400", for instance, if Plex is running on the same server as nginx.
server plex-server.example.com:32400;
}
server {
listen 80;
# server names for this server.