Skip to content

Instantly share code, notes, and snippets.

View trinitronx's full-sized avatar
⛩️
Zazen

James Cuzella trinitronx

⛩️
Zazen
View GitHub Profile
@trinitronx
trinitronx / xcode-cli-tools.sh
Last active January 18, 2024 05:20
Script to download & install XCode Command Line tools on OSX 10.7 or 10.8. Lifted from jedi4ever/veewee template.
#!/bin/sh
# 2021-12-09:
# This script is no longer supported!
# Apple broke all direct downloads without logging with an Apple ID first.
# The number of hoops that a script would need to jump through to login,
# store cookies, and download is prohibitive.
# Now we all must manually download and mirror the files for this to work at all :'-(
OSX_VERS=$(sw_vers -productVersion | awk -F "." '{print $2}')
@alexyoung
alexyoung / tmux.conf
Created July 19, 2013 16:12
tmux cheap powerline
#!/usr/bin/env sh
ioreg -l | grep -i capacity | tr '\n' ' | ' | awk '{printf("%.2f%%\n", $10/$5 * 100)}'
@fnichol
fnichol / shell.sh
Created April 23, 2013 16:41
Test Kitchen with bats - A Lightning Guide
SUITE_NAME=default
# create a bats subdirectory under your desired suite
mkdir -p test/integration/$SUITE_NAME/bats
# create an initial "canary" bats test file
# more examples at:
# * https://github.com/fnichol/chef-rvm/tree/master/test/integration/rubies/bats
# * https://github.com/fnichol/chef-ruby_build/tree/master/test/integration/alltherubies/bats
# * https://github.com/sstephenson/bats
@jdutton
jdutton / rsyslog-to-logstash.conf
Created April 2, 2013 19:33
Rsyslog conf file to send rsyslog output to logstash as a native json logstash event. For more info - see blog post at http://untergeek.com/2012/10/11/using-rsyslog-to-send-pre-formatted-json-to-logstash/
# Send a native logstash json event to the logstash server
$template ls_json,"{%timestamp:::date-rfc3339,jsonf:@timestamp%,\"@message\":\"%msg:::json%\",\"@fields\":{%fromhost:::jsonf:host%,%syslogfacility-text:::jsonf:syslog_facility%,%syslogfacility:::jsonf:syslog_facility_code%,%syslogseverity-text:::jsonf:syslog_severity%,%syslogseverity:::jsonf:syslog_severity_code%,%app-name:::jsonf:program%,%procid:::jsonf:pid%}}"
*.* @@mylogstashhost:5543;ls_json
@vinitkhandagle
vinitkhandagle / Bootstrap_vagrantvm
Last active December 14, 2015 23:18
Bootstrapping a Newly Installed Vagrant Box
linbynd:=> {master} ~/vagrant_machines$ knife bootstrap 192.168.1.3 -x vagrant -P vagrant --sudo
Bootstrapping Chef on 192.168.1.3
192.168.1.3 --2013-03-14 19:21:32-- http://opscode.com/chef/install.sh
192.168.1.3
192.168.1.3 Resolving opscode.com (opscode.com)...
192.168.1.3 184.106.28.83
192.168.1.3
192.168.1.3 Connecting to opscode.com (opscode.com)|184.106.28.83|:80...
192.168.1.3 connected.
192.168.1.3
@agrif
agrif / rgba-glx.c
Created December 16, 2012 01:58
MacSlow's ARGB GLX visuals demo, archived here because the original site is down :(
/*******************************************************************************
**3456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
** 10 20 30 40 50 60 70 80
**
** program:
** rgba-glx
**
** author:
** Mirco "MacSlow" Mueller <macslow@bangang.de>
**
@aaronjensen
aaronjensen / edit_data_bag.rb
Created November 21, 2012 04:39
Edit encrypted data bags for use with chef-solo and knife-solo
#!/usr/bin/env ruby
Dir.chdir File.join(__FILE__, "../..")
unless ENV['EDITOR']
puts "No EDITOR found. Try:"
puts "export EDITOR=vim"
exit 1
end
unless ARGV.count == 2
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active April 26, 2024 23:26 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@waffle2k
waffle2k / cidr2regex.py
Created April 3, 2012 18:04
Convert CIDR notation to regex
#!/usr/bin/python
''' Not my script, found on the Internet, and rediscovered on my hard drive
'''
import sys
def cidr_to_regex(cidr):
ip, prefix = cidr.split('/')
base = 0
for val in map(int, ip.split('.')):
@spudbean
spudbean / gist:1558257
Last active August 25, 2023 19:26
Look of disapproval and other emoticons
ಠ_ಠ
( ͡° ͜ʖ ͡°)
¯\_(ツ)_/¯
(╯°□°)╯︵ ┻━┻
http://www.fileformat.info/convert/text/upside-down.htm
WRTTN http://wrttn.me/30dbfd/
Unicode Emoticons