Skip to content

Instantly share code, notes, and snippets.

View russmckendrick's full-sized avatar
📚
Writting the second edition of Learn Ansible.

Russ McKendrick russmckendrick

📚
Writting the second edition of Learn Ansible.
View GitHub Profile
@dalecaru
dalecaru / innobackupex-restore.sh
Created April 20, 2011 13:42
Scripts to create and restore full and incremental backups (for all databases on server) using innobackupex from Percona.
#!/bin/sh
#
# Script to prepare and restore full and incremental backups created with innobackupex-runner.
#
# This script is provided as-is; no liability can be accepted for use.
#
INNOBACKUPEX=innobackupex-1.5.1
INNOBACKUPEXFULL=/usr/bin/$INNOBACKUPEX
TMPFILE="/tmp/innobackupex-restore.$$.tmp"
:+1:
:-1:
:airplane:
:art:
:bear:
:beer:
:bike:
:bomb:
:book:
:bulb:
@numan
numan / asg_boto.py
Created July 14, 2011 16:20
create an auto scaling group
#For a complete list of options see http://boto.cloudhackers.com/ref/ec2.html#boto.ec2.autoscale.group.AutoScalingGroup
ag = AutoScalingGroup(group_name='webserver-asg', load_balancers=['my-lb'],
availability_zones=['us-east-1a','us-east-1b', 'us-east-1c'],
launch_config='my-launch-config-name', min_size=2, max_size=20)
conn_as.create_auto_scaling_group(ag)
@numan
numan / autoscaling_boto.py
Created July 17, 2011 00:42
Example of setting up AWS auto scaling using boto API
"""
The MIT License (MIT)
Copyright (c) 2011 Numan Sachwani
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
@ravasthi
ravasthi / _config.yml
Created February 15, 2012 08:59
Multiple authors on Jekyll
authors:
hanzou:
name: Hanzou Hattori
display_name: Hanzou
gravatar: c66919cb194f96c696c1da0c47354a6a
email: hanzou@company.com
web: http://company.com
twitter: company
github: hhattori
jorgen:
@phred
phred / pedantically_commented_playbook.yml
Last active November 3, 2023 01:55
Very complete Ansible playbook, showing off all the options
---
####
#### THIS IS OLD AND OUTDATED
#### LIKE, ANSIBLE 1.0 OLD.
####
#### PROBABLY HIT UP https://docs.ansible.com MY DUDES
####
#### IF IT BREAKS I'M JUST SOME GUY WITH
#### A DOG, OK, SORRY
####
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active April 26, 2024 23:26 — 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.
@walkeran
walkeran / gist:3713826
Created September 13, 2012 11:51
Exec resource with environment
[root@puppet ~]# cd /tmp/puppet/test6
[root@puppet test6]# puppet apply test.pp
notice: /Stage[main]//Exec[test2]/returns: executed successfully
notice: Finished catalog run in 0.30 seconds
[root@puppet test6]# ls
output2 test.pp
[root@puppet test6]# cat test.pp
@stephenmckinney
stephenmckinney / github-markdown.css
Created November 25, 2012 22:24 — forked from andyferra/github.css
Github Markdown CSS - for Marked.app or similar
body {
color: #333333;
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px;
}
@centerax
centerax / Proxy_SagePaySuite
Created June 5, 2013 13:23
workaround when you are behind a proxy
I have added this patch which should fix it
Payment.php
Add at line 1939
if($this->getConfigData('proxy_enabled')) {
$proxy_user_pwd = $this->getConfigData('proxy_user').':'.$this->getConfigData('proxy_pass');
$proxy_host_port = 'http://'.$this->getConfigData('proxy_host').':'.$this->getConfigData('proxy_port');
curl_setopt($curlSession, CURLOPT_PROXYUSERPWD, $usrPwd);
curl_setopt($curlSession, CURLOPT_PROXY, $proxy_host_port);
}