Skip to content

Instantly share code, notes, and snippets.

@miohtama
miohtama / gist:5216738
Created March 21, 2013 21:05
Enabling SSLCACertificateFile and SSLVerifyClient for one page only in Apache 2.2+
# Apache configuration for running local browser against a locally running xxxx for manual smartcard testing
# Listen 4433
<VirtualHost 127.0.0.1:4433>
# Real men use mod_proxy
DocumentRoot "/nowhere"
ServerName local-apache
ServerAdmin you@example.com
#!/bin/bash
#
# This is the script responsible for updating our Puppet master data,
# which includes modules, manifests, hiera data, etc. All of this data is
# managed in a git repository and upon "deploy" it is synced into the Puppet
# master.
#
# This script mirrors the remote git repository, looking for branches that
# match "env-*" (such as "env-production" or "env-test"). Each of these branches
# is setup as an environment into the Puppet master's data files. The
@rtyler
rtyler / gist:3041462
Created July 3, 2012 18:09
Rakefile for puppet-lint in CI
LINT_IGNORES = ['rvm']
namespace :lint do
desc "Check puppet module code style."
task :ci do
begin
require 'puppet-lint'
rescue LoadError
fail 'Cannot load puppet-lint, did you install it?'
end
@rprakashg
rprakashg / seed-sqsqueue-with-s3-notification-messages
Last active February 3, 2022 21:36
bash script to create SQS messages for files added to S3 between a specific date range
#!/bin/bash
profile={replace}
s3bucket={replace}
folder={specify}
queueprefix={replace}
purge-sqs-queue() {
if [ -z "$1" ]; then
echo "need to pass queue name prefix"
@jordansissel
jordansissel / Better Usage.md
Created December 20, 2010 12:07
Strip package scripts from .deb packages (postinst, postrm, preinst, prerm)

The best way to use this tool is to hook apt's use of dpkg to run it before doing any package installs.

In your apt.conf, put this:

DPkg::Pre-Install-Pkgs {"xargs -rL1 bash /path/to/stripdeb.sh 2>&1 | logger -t stripdeb"}

Then, a demo:

% sudo apt-get install mysql-server-5.1

@mavimo
mavimo / Readme.md
Last active March 11, 2023 09:22 — forked from steintore/Readme.md

Description

Dashing widget to display a Jenkins build status and build progress

The widget is based on the meter-widget which is default in the Dashing installation

The widget can also see the progress of a "pre-build", i.e if you have a job triggering the actual build you want to define, you can configure this job in the jenkins_build.rb as a prebuild.

For more information, please see Coding Like a tosser

@bentonporter
bentonporter / gist:2891463
Created June 7, 2012 20:51
Ruby - HMAC-SHA256 example
require 'openssl'
require 'Base64'
key = "secret-key"
data = "some data to be signed"
Base64.encode64(OpenSSL::HMAC.digest(OpenSSL::Digest::Digest.new('sha256'), key, data)).strip()
@sawanoboly
sawanoboly / haproxy.cfg
Created November 15, 2011 10:28
mongos behind haproxy configuration.
global
daemon
user haproxy
group haproxy
log /dev/log daemon info
maxconn 4096
defaults
log global
option dontlognull
@rachelmyers
rachelmyers / Chromebook_setup.md
Last active October 25, 2023 10:00
How I set up my Chromebooks' dev environment

Chromebook Setup Options

Option 1: Stay in Chrome OS

If you're writing bare-bones javascript for the browser, creating Chrome Apps and Extensions, or using remote coding apps like cloud9, Koding, or Nitrous, you may not need to install Ubuntu. Some tutorials can be done entirely within the browser. The tradeoff is that you won't have a full-featured command line, and you may hit a point where you can't install something that you need.

To start coding within Chrome OS, install Text or Caret as a text editor. (Text stores files in Google Docs and Caret stores the files locally on your machine, which may help you choose.) After that, you're good to go, since Chromebooks come with a browser installed.

Optio

@svrist
svrist / cf_create_or_update.py
Created February 7, 2017 21:34
Update or create a CloudFormation stack given a name and template + params'
'Update or create a stack given a name and template + params'
from __future__ import division, print_function, unicode_literals
from datetime import datetime
import logging
import json
import sys
import boto3
import botocore