Skip to content

Instantly share code, notes, and snippets.

View thwarted's full-sized avatar
🥓
increasingly at large

Andy Bakun thwarted

🥓
increasingly at large
View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist>
<array>
<dict>
<key>AudioList</key>
<array>
<dict>
<key>AudioBitrate</key>
<string>320</string>
@thwarted
thwarted / heroku-toolbelt.spec
Last active January 2, 2016 10:29
rpm .spec file for heroku-toolbelt
Name: heroku-toolbelt
Version: 3.2.1
Release: 1%{?dist}
Summary: Heroku Toolbelt Client
Group: Development
License: Unknown
URL: https://toolbelt.heroku.com/
#Source0:
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@thwarted
thwarted / tmux-keep-ssh-agent-socket.sh
Last active June 10, 2022 22:31
the shell function tmx will start a new, persistent (meaning you can be connected to it multiple times at the same time), with the ssh-agent connection available even if you get disconnected and reconnect
#!/bin/bash
# source this file in the shell
#
# the shell function tmx will start a new, persistent (meaning you can be
# connected to it multiple times at the same time), with the ssh-agent
# connection available even if you get disconnected and reconnect
#
# start or connect to an instance named "default"
# tmx
@thwarted
thwarted / start-minimal-apache
Created November 27, 2013 07:58
minimum Apache command line to start up a single shot web server with directory indexes and logging to the terminal. Uses compiled in default for ServerRoot (so modules can be found)
httpd \
-f /dev/null \
-C 'LoadModule autoindex_module modules/mod_autoindex.so' \
-C 'LoadModule log_config_module modules/mod_log_config.so' \
-C 'LoadModule dir_module modules/mod_dir.so' \
-C "DocumentRoot $( readlink -f .)" \
-C 'Listen 7000' \
-C 'ErrorLog /dev/stdout' \
-C 'PidFile /tmp/pidfile' \
-C 'LogFormat "%h %l %u %t \"%r\" %>s %b" common' \
@thwarted
thwarted / gist:7667199
Created November 26, 2013 22:07
pretty printed git log
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
https://coderwall.com/p/euwpig
#!/bin/bash -x
set -e
rm -rvf /srv/mypup/ /var/lib/puppetmaster/*
# Where you'll deploy puppet configuration (this is what you want version controlled)
# You may expect this to be /etc/puppet or /etc/puppetmasters, but deploying regularly
# updated stuff to /etc makes my sysadmin sense tingle (in a bad way), and the
# manifests can get kind of large
@thwarted
thwarted / git-crypt.spec
Created November 20, 2013 07:06
spec file for git-crypt
Summary: git-crypt git module
Name: git-crypt
Version: 0.3
Release: 1%{?dist}
License: GPL
Group: Development/Tools
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(id -un)-root
Source0: %{name}-%{version}.tar.bz2
Requires: openssl >= 0.9.8, pam, openssh-server, openssh
URL: https://www.agwa.name/projects/git-crypt/
file { "/my/wrapper":
source => "puppet://...."
}
exec { "work-that-requires-key":
command => "ssh-agent /my/wrapper",
require => File["/my/wrapper"]
}
@thwarted
thwarted / format-json-as-rss.php
Created June 18, 2013 07:13
Format some data as RSS that is currently only available as JSON
#!/usr/bin/php
<?php
date_default_timezone_set("GMT");
$type = "a type";
$key = "some identifier";
$json = "canonical url of this json stuff";
$entries = json_decode(file_get_contents("php://stdin"));
@thwarted
thwarted / evrouter.spec
Created June 9, 2013 03:37
RPM spec file for evrouter
%define version 0.4
Summary: evrouter
Name: evrouter
Version: %{version}
Release: 1
License: GPL2
Group: Applications
URL: http://www.bedroomlan.org/projects/evrouter
Source: http://debian.bedroomlan.org/debian/pool/main/e/evrouter/evrouter_%{version}.tar.gz