Skip to content

Instantly share code, notes, and snippets.

View christopherdolan's full-sized avatar

Christopher Dolan christopherdolan

  • Pasadena, CA, USA
View GitHub Profile
~/.rvm/gems/ruby-1.8.7-p299@hydra-dev/gems/jeweler-1.4.0/lib/jeweler/commands/check_dependencies.rb:13:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
All dependencies seem to be installed.
~/.rvm/rubies/ruby-1.8.7-p299/bin/ruby -I"lib:lib:test" "~/.rvm/gems/ruby-1.8.7-p299@global/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/sync_test.rb" "test/runner_test.rb" "test/pipe_test.rb" "test/fixtures/sync_test.rb" "test/worker_test.rb" "test/message_test.rb" "test/master_test.rb" "test/ssh_test.rb"
Loaded suite ~/.rvm/gems/ruby-1.8.7-p299@global/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
........1282318144.3936 MASTER| Initialized
1282318144.39363 MASTER| Files: (["test_a.rb"])
1282318144.39365 MASTER| Workers: ([{:type=>:ssh, :connect=>"localhost", :directory=>"/tmp/hydra/remote", :runners=>1}])
1282318144.39366 MASTER| Verbose: (true)
1282318144.39367 MASTER| Booting 1 workers
@christopherdolan
christopherdolan / ant jetty.run >
Created November 17, 2010 00:31
Output from ant jetty.run using
/tmp/jetty-example$ tree
.
|-- build.xml
`-- jetty-lib
|-- core-3.1.1.jar
|-- jetty-6.1.26.jar
|-- jetty-ant-6.1.26.jar
|-- jetty-naming-6.1.26.jar
|-- jetty-plus-6.1.26.jar
|-- jetty-util-6.1.26.jar
<project name="Jetty-Ant integration test" basedir=".">
<path id="jetty.plugin.classpath">
<fileset dir="jetty-lib" includes="*.jar"/>
</path>
<taskdef classpathref="jetty.plugin.classpath" resource="tasks.properties" loaderref="jetty.loader" />
<target name="jetty.run">
<jetty />
</target>
</project>
@christopherdolan
christopherdolan / colourise.sh
Created July 25, 2011 22:13
Colourise all or part of a bash prompt (fancy mode)
# This function will take any string and combination of colors
# and will return the string in alternating colors
function colourise
{
string=$1
first_colour=$2
second_colour=$3
out_string=""
@christopherdolan
christopherdolan / myprompt.sh
Created July 25, 2011 22:49
MY bash prompt
[[ -s "$HOME/bin/dotfiles/ps1_functions" ]] && source "$HOME/bin/dotfiles/ps1_functions"
smiley()
{
if (( $? == 0 )) ; then
printf "%s" "\[\e[1;92m\]:)\[\e[m\]"
else
printf "%s" "\[\e[1;91m\]:(\[\e[m\]"
fi
}
@christopherdolan
christopherdolan / calculate_gpa.rb
Created August 6, 2011 03:08
tiny little script to calculate a gpa in ruby
# a Hash of mappings between letter grade and GPA value
@grades = {
'a' => 4.0,
'b' => 3.0,
'c' => 2.0,
'd' => 1.0,
'f' => 0.0
}
# a method for calculating a student's GPA
//THE EXERCISE:
//This problem is the same as the previous problem (HTTP COLLECT) in that you need to use http.get().
//However, this time you will be provided with three URLs as the first three command-line arguments.
//You must collect the complete content provided to you by each of the URLs and print it to the console (stdout).
//You don't need to print out the length, just the data as a String; one line per URL.
//The catch is that you must print them out in the same order as the URLs are provided to you as command-line arguments.
//MY ISSUE:
//This is problem #9 on LearnYouNode from nodeschool.io
2016-02-02 12:20:42 ERROR POSTPROCESSER :: Failed Unrar archive star.wars.rebels.s02e05.1080p.webrip.x264-qcf.rar: invalid literal for int() with base 10: '?' [3dd13c3]
2016-02-02 12:20:41 INFO POSTPROCESSER :: star.wars.rebels.s02e08.1080p.webrip.x264-qcf.rar : Unpacking failed: Unpacking failed for an unknown reason
ValueError: invalid literal for int() with base 10: '?'
data['size'] = int(fields[1])
File "/opt/sickrage/lib/unrar2/unix.py", line 173, in infoiter
for params in RarFileImplementation.infoiter(self):
File "/opt/sickrage/lib/unrar2/__init__.py", line 120, in infoiter
return list(self.infoiter())
File "/opt/sickrage/lib/unrar2/__init__.py", line 125, in infolist
for file_in_archive in [ek(os.path.basename, x.filename) for x in rar_handle.infolist() if not x.isdir]:
2016-02-02 12:20:41 ERROR POSTPROCESSER :: Failed Unrar archive star.wars.rebels.s02e08.1080p.webrip.x264-qcf.rar: invalid literal for int() with base 10: '?' [3dd13c3]
2016-02-02 12:20:41 INFO POSTPROCESSER :: Processing succeeded for /bigstore/download/processing/tv/Family.Guy.S14E02.720p.HDTV.x264-BATV/Family.Guy.S14E02.720p.HDTV.x264-BATV.mkv
2016-02-02 12:20:41 INFO POSTPROCESSER :: File exists and new file is same size, pretending we did something
2016-02-02 12:20:41 INFO POSTPROCESSER :: Processing /bigstore/download/processing/tv/Family.Guy.S14E02.720p.HDTV.x264-BATV/Family.Guy.S14E02.720p.HDTV.x264-BATV.mkv (None)
2016-02-02 12:20:37 INFO POSTPROCESSER :: star.wars.rebels.s02e06.1080p.webrip.x264-qcf.rar : Unpacking failed: Unpacking failed for an unknown reason
ValueError: invalid literal for int() with base 10: '?'
data['size'] = int(fields[1])
File "/opt/sickrage/lib/unrar2/unix.py", line 173, in infoiter
for params in RarFileImplementation.infoiter(self):
File "/opt
2016-02-02 12:20:37 ERROR POSTPROCESSER :: Failed Unrar archive star.wars.rebels.s02e06.1080p.webrip.x264-qcf.rar: invalid literal for int() with base 10: '?' [3dd13c3]
2016-02-02 12:20:31 INFO POSTPROCESSER :: PostProcessing Path: /bigstore/download/processing/tv
]
2016-02-02 12:14:39 INFO Thread-52 :: [
2016-02-02 12:14:39 INFO Thread-52 :: [n]
2016-02-02 12:14:39 INFO Thread-52 :: [o]
2016-02-02 12:14:39 INFO Thread-52 :: [s]
2016-02-02 12:14:39 INFO Thread-52 :: [a]
2016-02-02 12:14:39 INFO Thread-52 :: [e]
2016-02-02 12:14:39 INFO Thread-52 :: [r]