Skip to content

Instantly share code, notes, and snippets.

@SEJeff
SEJeff / settings_ldap.py
Created July 8, 2011 22:27
Example django_auth_ldap configuration
############################## django-auth-ldap ##############################
import ldap
from django_auth_ldap.config import LDAPSearch, PosixGroupType
# django-auth-ldap configuration starts here
AUTH_LDAP_SERVER_URI = "ldap://ldap.els03.loc ldap://ldap.zbw03.loc ldap://ldap.cvg03.loc"
#AUTH_LDAP_USER_DN_TEMPLATE = "uid=%(user)s,ou=People,o=loc"
# JW is in ou=Admin,o=loc so we search over o=loc to find him
AUTH_LDAP_USER_SEARCH = LDAPSearch("o=loc",
@geekforbrains
geekforbrains / post-receive
Created May 18, 2012 19:11
Git post-receive rsync to remote server
#!/bin/bash
REPO=NAME_HERE
# Dir paths on remote server
# These are associated with branches within a git project
LIVE_BRANCH="master"
LIVE="git@host:/var/www/live/"
STAGE_BRANCH="develop"
STAGE="git@host:/var/www/stage/"
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active June 5, 2024 22:16 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@misterbrownlee
misterbrownlee / jenkins-notes.md
Created September 12, 2012 18:10
Jenkins setup

I just had to set up Jenkins to use GitHub. My notes (to myself, mostly):

Detailed Instructions

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.

Install Jenkins Plugins

@dergachev
dergachev / README.md
Created October 10, 2012 16:49
Vagrant tutorial

Vagrant Setup

This tutorial guides you through creating your first Vagrant project.

We start with a generic Ubuntu VM, and use the Chef provisioning tool to:

  • install packages for vim, git
  • create user accounts, as specified in included JSON config files
  • install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository

Afterwards, we'll see how easy it is to package our newly provisioned VM

@ravibhure
ravibhure / ruby.1.9.3-setup.sh
Created May 2, 2013 09:56
Install ruby 1.9.3 on CentOS
#!/usr/bin/env bash
# repository
cd /tmp
wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm
rpm -Uvh epel-release-6-7.noarch.rpm
# system update
yum -y update
yum -y groupinstall "Development Tools"
yum -y install libxslt-devel libyaml-devel libxml2-devel gdbm-devel libffi-devel zlib-devel openssl-devel libyaml-devel readline-devel curl-devel openssl-devel pcre-devel git memcached-devel valgrind-devel mysql-devel ImageMagick-devel ImageMagick
@Excedrin
Excedrin / bind.py
Last active December 21, 2015 01:59
#!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@jorke
jorke / ses.ps1
Created October 8, 2013 03:53
Send email via AWS SES using powershell one liner.
Send-MailMessage -From <from> -to <to> -subject <subject> -SmtpServer email-smtp.us-east-1.amazonaws.com -Credential
$(New-Object System.Management.Automation.PSCredential -argumentlist <AWS_ACCESS_KEY>,
$(ConvertTo-SecureString -AsPlainText -String <AWS_SECRET_KEY> -Force)
)
-UseSsl -Port 587
@wsargent
wsargent / docker_cheat.md
Last active June 29, 2024 19:32
Docker cheat sheet
@sts
sts / mrped
Created December 3, 2013 08:29
Check_MK use /etc/check_mk/mrpe.d instead of /etc/check_mk/mrpe.conf
#!/bin/bash
# MK's Remote Plugin Executor NG ;-)
#
# Workaround for check_mks inability to use scripts from a mrpe.d directory
# http://lists.mathias-kettner.de/pipermail/checkmk-en/2013-February/008646.html
#
# Make sure mrpe.cfg doesn't exist, or you will end up with two <<<mrpe>>>
# output sections.
#