Skip to content

Instantly share code, notes, and snippets.

View sob's full-sized avatar

Sean O'Brien sob

View GitHub Profile
@sob
sob / gist:7694088
Created November 28, 2013 15:57
Downloading a list of files from Google Docs. #ducttape
cat pics2.txt | sed -e 's#<br>#\n#g' | sed -e 's#<a#\n<a#g' | sed -e 's#</a>#</a>\n#g' | grep -v 'div' | grep -v ^$ | cut -d '/' -f 6 | xargs -I '{}' wget https://docs.google.com/uc?id={}&export=download
Spork.each_run do
ActionView::Template.register_template_handler :arb, lambda { |template|
"self.class.send :include, Arbre::Builder; @_helpers = self; self.extend ActiveAdmin::ViewHelpers; @__current_dom_element__ = Arbre::Context.new(assigns, self); begin; #{template.source}; end; current_dom_context"
}
end
06-21 20:42:35 INFO [tato.core.plugins.renamer] Renaming "/volume1/Orodruin/Movies/Haywire.2011.720p.BluRay.X264-BLOW.en.srt" to "/volume1/Orodruin/Movies-Clean/Haywire (2011) - 720P/Haywire-720P.en.srt"
06-21 20:42:35 ERROR [hpotato.core.plugins.base] Unable to create folder "/volume1/Orodruin/Movies-Clean/Haywire (2011) - 720P": [Errno 13] Permission denied: '/volume1/Orodruin/Movies-Clean/Haywire (2011) - 720P'
06-21 20:42:35 ERROR [tato.core.plugins.renamer] Couldn't move file '/volume1/Orodruin/Movies/Haywire.2011.720p.BluRay.X264-BLOW.en.srt' to '/volume1/Orodruin/Movies-Clean/Haywire (2011) - 720P/Haywire-720P.en.srt': Traceback (most recent call last):
File "/volume1/@appstore/couchpotatoserver/share/CouchPotatoServer/couchpotato/core/plugins/renamer/main.py", line 407, in moveFile
shutil.move(old, dest)
File "/usr/local/python/lib/python2.7/shutil.py", line 299, in move
copy2(src, real_dst)
File "/usr/local/python/lib/python2.7/shutil.py", line 128, in copy2
copyfile(src, dst)
Fil
#!/usr/bin/ruby
#
# This script installs to /usr/local only. To install elsewhere you can just
# untar http://github.com/mxcl/homebrew/tarball/master anywhere you like.
#
#
# 30th March 2010:
# Added a check to make sure user is in the staff group. This was a problem
# for me, and I think it was due to me migrating my account over several
# versions of OS X. I cannot verify that for sure, and it was tested on
xml.instruct!
xml.Response do
xml.Gather(:numDigits => 4, :action => verify_confirmation_path(:id => @confirmation.token)) do
xml.Say "Please enter your pin code."
end
end
rsync --ignore-existing --progress --recursive --perms --times \
--size-only --whole-file --exclude='.*' \
--dry-run /Users/sobrien/Music/iTunes/iTunes\ Music/ /Volumes/sob\ time\ capsule\ 001/Music/
<%= form_for(@user) do |f| %>
<%= f.label(:name) %>
<%= f.text_field(:name) %>
<%= f.submit %>
<% end -%>
- flash.each do |key, value|
%div{:id => "flash_#{key}", :class => "flash #{key}", :style => value.blank? ? "display: none;" : ""}= h(value)
context "on PUT to Admin::Contacts#spam" do
setup do
login_as(:quentin)
@contact = Factory(:contact)
put :spam, :id => @contact.id
end
should_assign_to :contact
should_set_the_flash_to /success/i
should_redirect_to 'admin_contacts_path()'
@sob
sob / test1
Created January 29, 2009 16:48
# mv backup ~/