Skip to content

Instantly share code, notes, and snippets.

@karmi
karmi / ElasticSearch.org.Website.Search.FieldNotes.markdown
Created April 8, 2011 17:15
Field notes gathered during installing and configuring ElasticSearch for http://elasticsearch.org

ElasticSearch.org Website Search: Field Notes

These are field notes gathered during installation of website search facility for the ElasticSearch website.

You may re-use it to put a similar system in place.

The following assumes:

@nyarly
nyarly / .bashrc
Created October 15, 2011 20:31
Change PATH based on Gemfile
source "/home/judson/bin/bundler_ps1.sh"
if [[ ! $PROMPT_COMMAND =~ __bundler_prompt_command ]]; then
export PROMPT_COMMAND="${PROMPT_COMMAND:-:} ; __bundler_prompt_command"
fi
PS1="\[\033[01;31m\]\$(__bundler_ps1)\[\033[01;34m\] $PS1"
@SethRobertson
SethRobertson / index.md
Created January 14, 2012 18:29
On undoing, fixing, or removing commits in git
@jperras
jperras / initialize.pp
Created January 17, 2012 19:25
Initialization puppet script for puppetmasterless puppet setup.
user { "git":
home => "/var/git",
ensure => present
}
file {
"/var/git":
ensure => directory,
owner => "git",
group => "git",
@lanwin
lanwin / add_users_to_projects.sh
Created February 2, 2012 08:41
Script to Automatically add all GitLab users to all projects
#!/bin/sh
baseurl=http://mygitlaburl
usermail=adminuser@mymailserver
userpass=adminpassword
repo_access=2 #0=denied 1=read 2=read&write
project_access=2 #0=deined 1=read 2=report 3=admin
# login
curl -s -I -c cookies.txt -d "utf8=✓&user[email]=$usermail&user[password]=$userpass&commit=Sign+in" $baseurl/users/sign_in
@garthk
garthk / bbb.pp
Created March 26, 2012 03:46
bigbluebutton recipe for Puppet (requires manual fixup: see comments)
class bbb($bbb_hostname = $fqdn, $salt = "d34db33fba5eba11f01dab1e5ca1ab1e") {
exec { "dist upgrade":
refreshonly => true,
command => "/usr/bin/apt-get dist-upgrade",
}
exec { "update and dist upgrade":
refreshonly => true,
command => "/usr/bin/apt-get update",
notify => Exec["dist upgrade"],
}
@cristianrasch
cristianrasch / gitlab.sh
Created April 22, 2012 01:50
Install Gitlab on Debian Squeeze/Wheezy
aptitude install -y git curl python-dev python-pip redis-server ruby1.9.1-full rubygems1.9.1
aptitude install -y mysql-server libmysqlclient-dev
adduser --system --shell /bin/sh --gecos 'git version control' --group --disabled-password --home /home/git git
adduser --disabled-login --gecos 'gitlab system' gitlab
usermod -a -G git gitlab
su - gitlab
ssh-keygen -q -N '' -t rsa -f /home/gitlab/.ssh/id_rsa
aptitude install gitolite
cp /home/gitlab/.ssh/id_rsa.pub /home/git/gitlab.pub
su - git
@bhenerey
bhenerey / ideal ops.md
Created May 23, 2012 19:40
ideal ops checklist

In a perfect world, where things are done well, not just quickly, I would expect to find the following when joining the company:

Documentation

  • Accurate / up-to-date systems architecture diagram

  • Accurate / up-to-date network diagram

  • Out-of-hours support plan

  • Incident management plan

@scalp42
scalp42 / boot.sh
Created July 17, 2012 00:26 — forked from PaulusTM/boot.sh
CentOS 6 chef bootstrap
#!/bin/bash
# Install by:
# curl -l <raw gist url> | bash
yum groupinstall -y "Development Tools"
yum install -y \
openssl-devel \
readline-devel \
curl-devel \
zlib-devel \
@simX
simX / hidpi.txt
Created July 28, 2012 04:58
Enable HiDPI mode in Mountain Lion w/o Quartz Debug
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool YES;
sudo defaults delete /Library/Preferences/com.apple.windowserver DisplayResolutionDisabled;
// by the way, you need to logout and log back in for this to take effect. Or at least that's what
// Quartz Debug says. Who knows, maybe it's lying?
// P.S. Go to [Apple menu --> System Preferences --> Displays --> Display --> Scaled] after logging
// back in, and you'll see a bunch of "HiDPI" resolutions in the list to choose from.