Skip to content

Instantly share code, notes, and snippets.

View christopherdolan's full-sized avatar

Christopher Dolan christopherdolan

  • Pasadena, CA, USA
View GitHub Profile
@christopherdolan
christopherdolan / i3-scrot
Created March 18, 2019 20:52
Just like vanilla i3-scrot, except this one uses xclip to load your clipboard with the saved screenshot
#!/bin/sh
# /usr/bin/i3-scrot
#
# simple screenshot-script using scrot for manjaro-i3 by oberon@manjaro.org
_conf=$HOME/.config/i3-scrot.conf
if ! [ -f $_conf ]; then
echo "scrot_dir=$(xdg-user-dir PICTURES)" > $_conf
fi
2016-02-02 12:14:28 ERROR Thread-52 :: Failed Unrar archive star.wars.rebels.s02e06.1080p.webrip.x264-qcf.rar: invalid literal for int() with base 10: '?' [3dd13c3]
2016-02-02 12:14:21 INFO Thread-52 :: PostProcessing Path: /bigstore/download/processing/tv
]
2016-02-02 12:10:59 INFO POSTPROCESSER :: [
2016-02-02 12:10:59 INFO POSTPROCESSER :: [n]
2016-02-02 12:10:59 INFO POSTPROCESSER :: [o]
2016-02-02 12:10:59 INFO POSTPROCESSER :: [s]
2016-02-02 12:10:59 INFO POSTPROCESSER :: [a]
2016-02-02 12:10:59 INFO POSTPROCESSER :: [e]
2016-02-02 12:10:59 INFO POSTPROCESSER :: [r]
2016-02-02 12:14:35 ERROR Thread-52 :: Failed Unrar archive star.wars.rebels.s02e08.1080p.webrip.x264-qcf.rar: invalid literal for int() with base 10: '?' [3dd13c3]
2016-02-02 12:14:34 INFO Thread-52 :: 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:14:34 INFO Thread-52 :: File exists and new file is same size, pretending we did something
2016-02-02 12:14:34 INFO Thread-52 :: 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:14:28 INFO Thread-52 :: 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/sickrage/lib/unrar2
2016-02-02 12:14:36 ERROR Thread-52 :: Failed Unrar archive star.wars.rebels.s02e05.1080p.webrip.x264-qcf.rar: invalid literal for int() with base 10: '?' [3dd13c3]
2016-02-02 12:14:35 INFO Thread-52 :: 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: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]
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: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]:
//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
@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
@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
}