This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Usage: puppet-package-over-ssh.rb HOST PACKAGE ACTION | |
% ruby puppet-package-over-ssh.rb snack sl uninstall | |
Package[sl] uninstall status: {:status=>"not-installed", :error=>"ok", :desired=>"unknown", :ensure=>:purged, :name=>"sl", :provider=>:apt} | |
% ruby puppet-package-over-ssh.rb snack sl install | |
Package[sl] install status: {:status=>"installed", :error=>"ok", :desired=>"install", :ensure=>"3.03-16", :name=>"sl", :provider=>:apt} | |
% ruby puppet-package-over-ssh.rb snack fancypants install | |
Could not install package Package[fancypants]: Execution of 'ssh snack sudo "/usr/bin/apt-get" "-q" "-y" "-o" "DPkg::Options::=--force-confold" "install" "fancypants"' returned 100: Reading package lists... | |
Building dependency tree... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Apache Load Balancer Front End ## | |
# Puppet Apache::Config[010_frontend_puppet_prod.conf] | |
# This file managed by Puppet from a template. | |
# source: puppet_frontend_XXXX.conf | |
# All CA requests should be directed to specific workers | |
<Proxy balancer://puppet_prod_ca> | |
# Only one member | |
BalancerMember http://puppetca.puppetlabs.vm:18140 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Script to import tumblr posts into local markdown posts ready to be consumed by Jekyll. | |
# Inspired by New Bamboo's post http://blog.new-bamboo.co.uk/2009/2/20/migrating-from-mephisto-to-jekyll | |
# Supports post types: regular, quote, link, photo, video and audio | |
# Saves local copies of images | |
require 'rubygems' | |
require 'open-uri' | |
require 'nokogiri' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
__doc__ = """ | |
simpledesktops_download.py | |
A quick script that fetches desktop images from the http://simpledesktops.com/ site. | |
It will start at the most current list of images and keep moving backwards, downloading | |
desktop images in to a directory on your local machine, until it finds an image that | |
already exists on disk. At that point it will stop. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# FOR CENTOS 6 | |
# Andrew Diller Jan 2012 | |
# Get EPEL Repo installed | |
rpm --httpproxy proxy --httpport 3128 --import https://fedoraproject.org/static/0608B895.txt | |
rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm | |
vi /etc/yum.repos.d/epel.repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from blueprint import example | |
from extensions import mail | |
from flask import Flask | |
import settings | |
def create_app(settings=settings): | |
ret_val = Flask(__name__) | |
ret_val.config.from_object(settings) | |
# initialize extensions... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
language: objective-c | |
before_script: | |
- ./scripts/travis/add-key.sh | |
after_script: | |
- ./scripts/travis/remove-key.sh | |
after_success: | |
- ./scripts/travis/testflight.sh | |
env: | |
global: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# consul Manage the consul agent | |
# | |
# chkconfig: 2345 95 95 | |
# description: Consul is a tool for service discovery and configuration | |
# processname: consul | |
# config: /etc/consul.conf | |
# pidfile: /var/run/consul.pid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Retries the given throwing `block` as a promise `tries` times, | |
/// re-calling `block` another time until exhausting the tries. | |
func retry<T>(tries count: Int, block: () throws -> T) -> Promise<T> { | |
return Promise().thenRetry(tries: count, block: block) | |
} | |
/// Retries the given promise-returning `block` as a promise `tries` times, | |
/// re-calling `block` another time until exhausting the tries. | |
func retry<T>(tries count: Int, block: () -> Promise<T>) -> Promise<T> { | |
return Promise().thenRetry(tries: count, block: block) |