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
see => http://github.com/cdollins/tdd_greed/tree/master |
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
f = File.open("/mnt/workspace/Sep19-235956/console.log", 'a+') | |
Errno::EACCES: Permission denied - /mnt/workspace/Sep19-235956/console.log | |
from (irb):1:in `initialize' | |
from (irb):1:in `open' | |
from (irb):1 |
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
desc "Flog Source" | |
task :flog do | |
IO.popen("find lib -name \\*.rb | xargs flog").each {|line| puts line } | |
end |
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 is a simple command line tool for uploading | |
# and folders of files to AWS S3. You must first | |
# create a vaild bucket to upload to. | |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'pathname' | |
require 'aws/s3' | |
include AWS::S3 |
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
class Quick | |
def self.sort(array) | |
return array if array.size < 2 | |
lesser = [] | |
greater = [] | |
pivot = array.pop | |
array.each do |x| | |
x <= pivot ? lesser << x : greater << x | |
end | |
self.sort(lesser) + [pivot]+ self.sort(greater) |
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
info it worked if it ends with ok | |
verbose cli [ 'node', | |
verbose cli '/usr/local/bin/npm', | |
verbose cli 'install', | |
verbose cli 'persistencejs-0.2.5', | |
verbose cli '-g' ] | |
info using [email protected] | |
info using [email protected] | |
verbose config file /root/.npmrc | |
verbose config file /usr/local/etc/npmrc |
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
app.post('/config', function(req, res) { | |
console.log('Received Config Push'); | |
//Get Client Name | |
var name = req.header('X-Forwarded-For'); | |
console.log('Destined for '+ name); | |
// Get message from POST | |
req.on('data', function(raw) { | |
console.log("Data train is here: " + raw); | |
//Send to NSA |
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
app.post('/config', function(req, res) { | |
console.log('Received Config Push'); | |
//Get Client Name | |
var name = req.header('X-Forwarded-For'); | |
console.log('Destined for '+ name); | |
// Get message from POST | |
req.on('data', function(raw) { | |
console.log("Data train is here: " + raw); | |
//Send to NSA |
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 | |
chroot=$1 | |
command=`which $2` | |
ldd $command | while read line; do | |
if [[ `echo $line | awk '{print $3}'` =~ ^/ ]] ; then | |
sso=`echo $line | awk '{print $3}'` | |
lib_path=`dirname $sso` | |
name=`basename $sso` |
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
class A | |
def initialize | |
p "Hello" | |
end | |
end | |
class B < A | |
def initialize | |
p "Fellow" | |
end |
OlderNewer