MacBook Air
11-inch, Mid 2011
Core i5
#!/bin/bash | |
# Bash shell script for generating self-signed certs. Run this in a folder, as it | |
# generates a few files. Large portions of this script were taken from the | |
# following artcile: | |
# | |
# http://usrportage.de/archives/919-Batch-generating-SSL-certificates.html | |
# | |
# Additional alterations by: Brad Landers | |
# Date: 2012-01-27 |
#!/usr/bin/env ruby -wKU | |
require 'csv' | |
# Usage: This script accepts filenames as arguments. The script expects the files | |
# passed to be the output of the CDRTool CSV export feature. The script is written | |
# to be as "unixy" as possible. Output is written to the stdout (and can be | |
# redirected). Status and errors are written to stderr. Output contains four | |
# columns in tab-separated value format: | |
# |
#!/usr/bin/env ruby -wKU | |
rvm_result = `source "$HOME/.rvm/scripts/rvm" && rvm use ruby-1.9.3-p0@log-examiner` | |
puts rvm_result | |
require 'date' | |
# Example: ./report_day.rb production.log 2012-02-18 | |
class App |
[mysqld] | |
# Slow query logging | |
log_slow_queries = /var/log/mysql/mysql-slow.log | |
long_query_time = 2 | |
log-queries-not-using-indexes | |
# Binary logging/replication; requires CUSTOMIZATION after auto-build! | |
#server-id = 1 # required for master/slave replication | |
log_bin = /var/log/mysql/mysql-bin.log |
desc "The default task; lists tasks" | |
task :default do | |
puts `rake --tasks` | |
end | |
desc "Go ahead, you deserve it" | |
task :endulge do | |
puts "You're great. You really are." | |
end |
#!/bin/bash | |
RHOST='user@hostname' | |
LPATH='/var/www/app-directory/' | |
DBPATH='/home/user/appbackup/app-name/db/' | |
SHAREPATH='/home/user/appbackup/app-name/shared/' | |
DBNAME='database_name' | |
DBUSER='database_user' | |
DBPASS='database_password' |
#!/usr/bin/env bash | |
# Drop this file somewhere in your path and give execute perms. Usage: | |
# | |
# $ tping <hostname> | |
ping $1 | while read pong; do echo "$(date): $pong"; done |
# UFW commands issued | |
ufw default deny | |
ufw allow 22 | |
ufw allow 10000 | |
ufw allow 3306 from IP_REDACTED | |
ufw limit ssh/tcp | |
uwf logging on | |
ufw enable |
module MyApps | |
# The MyApps module illustrates a common | |
# The first app class includes a call to Signal::trap | |
class App1 | |
def initialize | |
@pid = Process.pid | |
end |