Skip to content

Instantly share code, notes, and snippets.

@tylerwalts
tylerwalts / setupOSX.sh
Created March 5, 2014 19:56
This is a bash script to setup Mac OS X defaults on a new mac.
#!/bin/bash
#
# Set up OSX preferences
#
# Inspired by: https://github.com/mathiasbynens/dotfiles/blob/master/.osx
###########################################
# CONFIG
HOSTNAME="machiavellia"
TIMEZONE="America/Chicago" # 'systemsetup -listtimezones'
@tylerwalts
tylerwalts / update_library.pre.sh
Last active December 16, 2020 11:43
Bash script to add a ssh key to a user's home ssh config. Used prior to running a puppet librarian as part of a server bootstrap process.
#!/bin/sh
# Place the SSH key for the git service account used to access private repositories
home_path="$(cd && pwd)"
ssh_path="$home_path/.ssh"
mkdir -p $ssh_path
provider="bitbucket.org"
#provider="github.com"
@tylerwalts
tylerwalts / gist:7048136
Created October 18, 2013 20:53
A puppet module which wraps around a graphite module and provides some dependencies for it. Graphite needs whisper, graphite-web & carbon repos, and these are not in default repository for at least CentOS 6.4. Intended to be used with: https://github.com/electrical/puppet-graphite
class graphite_server {
exec { 'get carbon':
path => [ "/bin", "/usr/bin", "/usr/sbin" ],
command => "rpm -Uvh http://launchpadlibrarian.net/61905213/carbon-0.9.7-1.noarch.rpm",
creates => "/etc/carbon/carbon.conf",
unless => "yum list | grep carbon | grep installed",
}
exec { 'get whisper':
path => [ "/bin", "/usr/bin", "/usr/sbin" ],
@tylerwalts
tylerwalts / CitrixAutoLogin.js
Created May 29, 2013 19:12
Tampermonkey Script for Citrix VDI Auto-Login
// ==UserScript==
// @name Citrix VDI Auto Login
// @version 0.1
// @description Auto-login to Citrix VDI. Replace the ALL-CAPS strings below with your Domain, Username and Password
// @match https://myaccess.MYDOMAIN.com/vpn/index.html
// @copyright 2013, public domain
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js
// ==/UserScript==
$("input[name=login]").val("MYUSERNAME");