Skip to content

Instantly share code, notes, and snippets.

View cdollins's full-sized avatar
🏠
Working from home

Chad Dollins cdollins

🏠
Working from home
  • Twitter
  • Austin, TX, USA
  • 07:26 (UTC -06:00)
  • X @vipaca
View GitHub Profile
@cdollins
cdollins / operator_dilemma
Last active August 29, 2015 14:15
no private instance operator methods
class Klass
def test
thread_first "",
Runner,
Runner,
Runner
self.>> "",
Runner,
Runner,
Runner
@cdollins
cdollins / super.rb
Last active December 30, 2015 08:09
Super!
class A
def initialize
p "Hello"
end
end
class B < A
def initialize
p "Fellow"
end
@cdollins
cdollins / chroot_copier.sh
Created March 4, 2012 23:08
setup for chroot
#!/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`
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
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
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
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 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
desc "Flog Source"
task :flog do
IO.popen("find lib -name \\*.rb | xargs flog").each {|line| puts line }
end
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