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
# 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 |
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
∴ 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 |
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/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 |
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
a={{a}} | |
b={{b}} | |
c={{c}} | |
d={{d}} | |
e={{e}} |
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
# | |
# Active nginx for beginrescueend.com | |
# | |
root# bdsm nginx service status | |
nginx: | |
status: running | |
version: 1.0.2 | |
process: | |
pid: 26404 |
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 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*) |
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
package_error() | |
{ | |
local _message=$1 | |
if [[ -z "${_message}" ]] | |
then | |
fail "Cannot print a package error as no message was provided." | |
fi | |
local _log=$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
#!/bin/bash | |
update() | |
{ | |
echo "Before the update" | |
cat update > test.sh | |
echo "This has changed" | |
} | |
update |
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
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 |
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
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 |