Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am yggdrasil on github.
  • I am yggdrasil (https://keybase.io/yggdrasil) on keybase.
  • I have a public key whose fingerprint is 8D8F A94C A1CB 4012 C38C AA36 12CC 0B4A DB8A F978

To claim this, I am signing this object:

@Yggdrasil
Yggdrasil / gist:163d63a11f0efbc6a13b
Created June 30, 2015 09:35
Fetch and format a list of Pingdom probe servers via bash-scripting
# It can be useful to pull the list of Pingdom probe servers and format it for various applications, such as ACLs or whitelists.
# We simply use the RSS-feed and some Bash-scripting.
# For example, an Apache access-list:
printf "# Pingdom servers at %s\nAllow from " "$(date -u +%F' '%T' '%Z)" ; \
wget -qO- https://my.pingdom.com/probes/feed \
| awk '/IP: / {print $2}' | awk -F';' '{print$1}' | sort -n \
| while read ip; do \
printf "%s " "$ip" ;
done | sed 's/ $//' ; echo
VERSION="1.9.2"
PATCH="180"
DPKG_BUILD_ARCH="$(dpkg --print-architecture)"
set -e
DESTDIR="$(mktemp -d)"
debra create "$DESTDIR"
trap "debra destroy \"$DESTDIR\"" EXIT
location /hooks {
alias /srv/hooks/public;
passenger_enabled on;
}
@Yggdrasil
Yggdrasil / gist:3655448
Created September 6, 2012 11:58
Puppet: Run apt-get update before installing Package
exec { "apt-get update":
refreshonly => true,
schedule => daily,
}
Exec["apt-get update"] -> Package <| |>
@Yggdrasil
Yggdrasil / gist:4051062
Created November 10, 2012 13:31
Puppet virtual users class
# Class: users
#
# This module manages users
#
# Parameters:
#
# Actions:
#
# Requires:
#
@Yggdrasil
Yggdrasil / perf.js
Created November 1, 2015 00:32 — forked from tkadlec/perf.js
Super simple example of adding perf timing to the page display during dev work
(function () {
var perfBar = function(budget) {
window.onload = function() {
window.performance = window.performance || window.mozPerformance || window.msPerformance || window.webkitPerformance || {};
var timing = window.performance.timing,
now = new Date().getTime(),
output, loadTime;
#!/bin/bash
# Intial git svn clone:
# git svn clone --prefix=svn/ -A ~/.svn2git/authors -s https://svn.wxwidgets.org/svn/wx/wxWidgets wxWidgets
cd ~/svn-git-mirrors/wxWidgets;
if [ -f .sync-running-wxWidgets ]; then exit 1; fi;
touch .sync-running-wxWidgets
@Yggdrasil
Yggdrasil / coreos-efs-cloud-config
Created August 3, 2016 14:47 — forked from kgorskowski/coreos-efs-cloud-config
coreos cloud-config file for dynamically mount aws efs in the right availability zone
#cloud-config
write-files:
- path: /etc/conf.d/nfs
permissions: '0644'
content: |
OPTS_RPC_MOUNTD=""
users:
- name: XYZ
groups:
@Yggdrasil
Yggdrasil / traefik.pp
Created September 25, 2016 22:09
Puppet profile for Traefik reverse proxy in TLS offloading with automatic Let's Encrypt support
# Installs and configures the Traefik.io reverse proxy, for TLS-offloading and
# automatic Let's Encrypt SSL management.
#
# Requirements:
# - Module https://forge.puppet.com/praekeltfoundation/traefik and dependencies
# - gem 'toml-rb' installed on Puppet Master
class profiles::traefik {
file { '/var/lib/traefik/':
ensure => 'directory',
owner => 'root',