Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/perl
# ************************************************************
# * gifmaker - A tool for making animated GIFs from video
# files. This works as a wrapper around
# FFmpeg and ImageMagick's convert.
#
# For more details see:
# http://www.leshylabs.com/blog/dev/2013-08-04-Making_Animated_GIFs_from_the_Linux_Command_Line.html
# ************************************************************
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC
"-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>se.protomou.unspotlight</string>
<key>Program</key>
<string>/usr/local/sbin/unspotlight</string>
#!/usr/bin/env ruby
require 'erb'
require 'ipaddr'
class HostParseError < StandardError; end
class Host
attr_accessor :fqhn, :port, :user, :name, :proxy
#!/usr/bin/env ruby
require 'erb'
Cluster = Struct.new(:name, :hosts)
class Host
attr_accessor :fqdn, :port, :user, :name, :proxy
#!/usr/bin/env python
from __future__ import print_function
import sys
from string import zfill
from zipfile import ZipFile
def main(path, crc, *args):
with ZipFile(path, 'r') as zip:
#cloud-config
write_files:
- path: /var/lib/rancher/conf/hello-world.yml
permissions: "0600"
owner: root
content: |
hello-world:
image: wowgroup/hello-world
restart: always
labels:
time="2015-12-09T13:01:51.398751309Z" level=info msg="GET /v1.15/images/wowgroup/hello-world/json"
time="2015-12-09T13:01:51.398848536Z" level=error msg="Handler for GET /v1.15/images/wowgroup/hello-world/json returned error: No such image: wowgroup/hello-world"
time="2015-12-09T13:01:51.398869965Z" level=error msg="HTTP Error" err="No such image: wowgroup/hello-world" statusCode=404
time="2015-12-09T13:01:51.408722333Z" level=info msg="GET /v1.15/images/wowgroup/hello-world/json"
time="2015-12-09T13:01:51.408851913Z" level=error msg="Handler for GET /v1.15/images/wowgroup/hello-world/json returned error: No such image: wowgroup/hello-world"
time="2015-12-09T13:01:51.408872650Z" level=error msg="HTTP Error" err="No such image: wowgroup/hello-world" statusCode=404
time="2015-12-09T13:01:52.088161201Z" level=info msg="GET /v1.15/images/wowgroup/hello-world/json"
time="2015-12-09T13:01:52.088258529Z" level=error msg="Handler for GET /v1.15/images/wowgroup/hello-world/json returned error: No such image: wo
@haegrr
haegrr / letsencrypt-hook-aws.py
Created February 15, 2016 11:17
AWS hook for letsencrypt.sh
#!/usr/bin/env python -u
from __future__ import print_function
import os, sys, re, boto3
route53 = boto3.client('route53')
iam = boto3.client('iam')
def zone_cmp(first, second):
return first['Name'].count('.') - second['Name'].count('.')
package main
import (
"bufio"
"bytes"
"flag"
"io"
"log"
"os"
"strings"
@haegrr
haegrr / codebuild-hook.js
Created February 15, 2017 22:04
CodeBuild Lambda hook for CodeCommit
'use strict';
const AWS = require('aws-sdk');
const codeBuild = new AWS.CodeBuild();
const codeCommit = new AWS.CodeCommit();
function listProjects() {
return new Promise((resolve, reject) => {
let projects = [];