Skip to content

Instantly share code, notes, and snippets.

View wayneeseguin's full-sized avatar
🤪

Wayne E Seguin wayneeseguin

🤪
View GitHub Profile
@wayneeseguin
wayneeseguin / gist:1095634
Created July 20, 2011 18:51
My thought on improving Ruby construct end syntax.
# I have now programmed in a lot of languages, and one thing I can say for sure
# is that shell scripting does construct end styles very well.
#
# Example from http://redmine.ruby-lang.org/issues/5054
#
# This is indeed also one of my few personal issues with Ruby syntax, the end trail.
#
module MyModule
class MyClass
@wayneeseguin
wayneeseguin / gist:1090427
Created July 18, 2011 19:33
1.8.7-p352 compile issue on OSX Lion
∴ rvm remove 1.8.7 ; rvm install 1.8.7
Removing /Users/wayneeseguin/.rvm/src/ruby-1.8.7-p352...
Removing /Users/wayneeseguin/.rvm/rubies/ruby-1.8.7-p352...
Removing ruby-1.8.7-p352 aliases...
Removing ruby-1.8.7-p352 wrappers...
Removing ruby-1.8.7-p352 environments...
Removing ruby-1.8.7-p352 binaries...
Installing Ruby from source to: /Users/wayneeseguin/.rvm/rubies/ruby-1.8.7-p352, this may take a while depending on your cpu(s)...
ruby-1.8.7-p352 - #fetching
#!/bin/bash
date_range() {
# Output list of dates from $1 to $2
}
for d in $(date_range 2011-01-01 2011-02-01) ; do
my_command $d
done
@wayneeseguin
wayneeseguin / template_.conf
Created May 30, 2011 14:29 — forked from mpapis/template_.conf
templates on bdsm
a={{a}}
b={{b}}
c={{c}}
d={{d}}
e={{e}}
@wayneeseguin
wayneeseguin / gist:969347
Created May 12, 2011 20:16
root# bdsm nginx status
#
# Active nginx for beginrescueend.com
#
root# bdsm nginx service status
nginx:
status: running
version: 1.0.2
process:
pid: 26404
#!/usr/bin/env bash
# This is an RVM Project .rvmrc file, used to automatically load the ruby
# development environment upon cd'ing into the directory
case "$(hostname)" in
*-util*|*-p0*)
environment_id="rbx-head@projecta"
;;
*-etl*)
@wayneeseguin
wayneeseguin / gist:959068
Created May 6, 2011 14:48 — forked from iande/gist:959065
First Stab @ package_error
package_error()
{
local _message=$1
if [[ -z "${_message}" ]]
then
fail "Cannot print a package error as no message was provided."
fi
local _log=$2
@wayneeseguin
wayneeseguin / test.sh
Created May 5, 2011 14:36
Bash live update
#!/bin/bash
update()
{
echo "Before the update"
cat update > test.sh
echo "This has changed"
}
update
@wayneeseguin
wayneeseguin / gist:948807
Created April 29, 2011 19:00
When you login to a Linux server, what kind of information could be useful to see immediately?
General Linux question,
When you login to a Linux server, what kind of information could be useful to see immediately?
This should be implementation agnostic so no 'ubuntu' or 'gentoo' or 'whatever' specific systems.
Responses so far for the BDSM system info extension include:
* host name
* host architecture
@wayneeseguin
wayneeseguin / gist:947529
Created April 28, 2011 23:01
Which stack trace option yields the most useful information best?
Note: This part of the discussion is now over, #1 was the "winner" :)
See the other file for Part II of the discussion and the end result.
# Option 1 - Tabular
5. fail() 266 /usr/local/bdsm/modules/bash/logging/dsl
4. module_dsl() 236 /usr/local/bdsm/modules/bash/modules/dsl
3. source() 3 /usr/local/bdsm/extensions/mod/bin/dsl
2. extension_action() 152 /usr/local/bdsm/modules/bash/extensions/dsl
1. main() 76 /usr/local/bin/bdsm