Skip to content

Instantly share code, notes, and snippets.

View thcipriani's full-sized avatar

Tyler Cipriani thcipriani

View GitHub Profile
@thcipriani
thcipriani / chef_server_setup
Last active December 26, 2015 05:49
Chef Server Setup
Chef Server Setup
=============
- Ubuntu 12.04 x86_64 (only other option is RHEL 5 or 6)
- Hostname setup:
echo "parabola" > /etc/hostname
hostname -F /etc/hostname
```/etc/hosts
127.0.0.1 fqdn hostname localhost
# (e.g., 127.0.0.1 parabola.tylercipriani.com parabola localhost)
@thcipriani
thcipriani / gist:7122315
Created October 23, 2013 16:55
SVN from source on OSX
* Make sure command line tools are installed for your OS
* Switch to root:
`sudo -i`
enter your password when prompted
* Check your SVN version:
`svn --version`
* Get Subverion 1.6 code in /usr/local/src/:
@thcipriani
thcipriani / gif
Last active December 26, 2015 15:38
Perfect Gif/Bash Workflow.
#!/usr/bin/env bash
# Dropbox + Bash = Lighting Fast .gif retrieval
# -----------------------
# Usage: gif <part-of-gif-basename>
# Prerequisites:
# - keep a butt-load of gifs in your "$HOME/Dropbox/Public/gifs" folder
# - Export a DROPBOX_UID variable that has your dropboxusercontent id
# - ...like a boss (https://dl.dropboxusercontent.com/u/2372716/gifs/like-a-boss.gif)
arg=$1
@thcipriani
thcipriani / baller_motd.md
Last active February 12, 2023 12:28
Using img2ponysay to create baller /etc/motd message

Update: I made this a proper blog post

Creating Baller/Useful MOTD Messages

Zangief MOTD

Prerequisites

  • linux box
@thcipriani
thcipriani / orders.js
Created February 4, 2014 22:11
Small MC
$.observable = function(model) {
model.Vent = $({});
var handleEvent = function(vent, args) {
var argArr = Array.prototype.slice.call(args);
model.Vent[vent].apply(model.Vent, argArr);
return model;
};
model.trigger = function() { return handleEvent('trigger', arguments); };
@thcipriani
thcipriani / checkedbury.sh
Created February 5, 2014 18:39
Ebury rootkit detect
#!/usr/bin/env bash
ipcs=$(ipcs -m | grep root | grep -c 666)
if (( $ipcs > 1 )); then
echo "ROOT KIT DETECTED" | mail -s "ROOTKIT ON CCREMIX" thcipriani@gmail.com
else
echo "we're cool"
fi
@thcipriani
thcipriani / 2012-04-12-brewday.md
Last active August 29, 2015 13:59
Brew Day Checklist
@thcipriani
thcipriani / index.html
Created May 2, 2014 15:49
Ansi → HTML
<HEAD>
<TITLE></TITLE>
<STYLE>
PRE{LINE-HEIGHT:1.3;FONT-FAMILTY:MONACO,'COURIER NEW';}
</STYLE>
</HEAD>
<BODY BGCOLOR=BLACK>
&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;
<CENTER>
me:
@true
a:
@true
sandwich:
@[ "$$(id -u)" -eq 0 ] && echo "Okay." || echo "What? Make it yourself."
.PHONY: me a sandwich
@thcipriani
thcipriani / dynnds
Last active August 29, 2015 14:01
dyndns
#!/usr/bin/env python
# http://blog.vrypan.net/2012/12/20/dynamic-dns-with-route53/
from area53 import route53
from boto.route53.exception import DNSServerError
import subprocess
import sys
def get_ip():
p = subprocess.Popen("/usr/bin/dig +short @resolver1.opendns.com myip.opendns.com", stdout=subprocess.PIPE, shell=True)
(output, err) = p.communicate()