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
@technicool
technicool / figinstall.sh
Last active August 29, 2015 14:05
Install necessary stuff to get fig running on a vanilla Ubuntu 14.04 image
#!/bin/bash
#
# NOTE: This must be run as root!
#
# Install necessary stuff to get fig running on a vanilla Ubuntu 14.04 image.
#
# This should really be put in some automated deployment system, but it's a
# good reference point for trying out fig and docker on an AWS or similar cloud.
#
# You can also use this to ensure that your development machine is up and running
@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)
@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);
}
@ckolos
ckolos / create_subnet.yml
Last active February 13, 2018 13:15
VPC Subnet Playbook
---
- hosts: localhost
connection: local
gather_facts: false
vars_files:
- subnet_vars.yml
vars:
azs: "{{ azmap.keys() | sort}}"
debug: false
@stamler
stamler / install_splunk.sh
Created December 10, 2014 21:17
Install Splunk Enterprise 6.2 on CentOS 7 Minimal as a non-root user systemd service and enable syslog on port 514 and http on port 80
#!/bin/bash
# Install Splunk 6.2 on CentOS 7 as a non-root user service that runs on boot with
# systemd. This script also opens the firewall to allow syslog on UDP port 514. Since
# we're running Splunk as non-root, this port is then forwarded to 5514. Configuring a
# syslog input in slunk on UDP 514 will gather this data. Must be run as root
# Create Account
useradd splunk
groupadd splunk
@mattes
mattes / call
Last active December 29, 2020 09:49
Place a call from terminal using your iPhone (Mac OS X Yosemite & iOS 8)
#!/usr/bin/env sh
open "tel://$*"
@clay584
clay584 / gist:5a75009ad571af3d0648
Created October 15, 2014 03:15
Cisco Log Grok Expression
input {
file {
#if you are reading files that syslog-ng has written to.
path => ["/var/log/syslog-ng.log"]
type => "syslog"
tags => [ "network" ]
}
tcp {
#if syslog-ng is relaying to logstash on TCP/514
port => 514
@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: