This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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}') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
ioreg -l | grep -i capacity | tr '\n' ' | ' | awk '{printf("%.2f%%\n", $10/$5 * 100)}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************************* | |
**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> | |
** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This playbook has been removed as it is now very outdated. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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('.')): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ಠ_ಠ | |
( ͡° ͜ʖ ͡°) | |
¯\_(ツ)_/¯ | |
(╯°□°)╯︵ ┻━┻ | |
http://www.fileformat.info/convert/text/upside-down.htm | |
WRTTN http://wrttn.me/30dbfd/ | |
Unicode Emoticons |