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
require 'rss' | |
require 'open-uri' | |
url = 'http://www.reddit.com/user/Shitty_Watercolour.rss' | |
open(url) do |rss| | |
feed = RSS::Parser.parse(rss.read) | |
feed.items.each do |item| | |
if item.description =~ /(http:\/\/i\.imgur\.com\/\S+[.jpg])/ | |
`curl -O #{$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
require 'open-uri' | |
require 'nokogiri' | |
require 'pry' | |
doc = Nokogiri::XML(File.open('/tmp/programs.xml')) | |
doc.css('link').each do |link_el| | |
href = link_el.attr('href') | |
if href =~ /(.html)+$/ |
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
namespace :log do | |
desc "Downloads application logs to ./log/deploy/<RAILS_ENV>/<TIMESTAMP>/" | |
task :fetch, :roles => :app do | |
source = "#{shared_path}/log/#{rails_env}.log" | |
files_per_host = {} | |
run "ls #{source}" do |channel, stream, data| | |
files_per_host[channel[:xserver]] = data.split("\n").map(&:split) | |
end | |
destination = File.join('log', 'deploy') |
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
# Maintainer: Eugeni Dodonov <[email protected]> | |
pkgname=glamor-git | |
pkgver=20121214 | |
pkgrel=1 | |
pkgdesc='OpenGL based 2D rendering acceleration library ' | |
arch=('i686' 'x86_64') | |
url='http://cgit.freedesktop.org/xorg/driver/glamor/' | |
license=('custom') | |
depends=('glibc' 'mesa' 'libdrm' 'xorg-server-devel' 'libx11' 'xf86driproto' 'glproto' 'libegl') |
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
(type.ps) runlibfile | |
(unit.ps) runlibfile | |
(IsoLatin.enc) runlibfile | |
/default_encoding IsoLatin def | |
<< /Duplex false /Tumble false >> setpagedevice | |
/pagesize [612 792] def | |
/margin 3 dict def margin begin /top 1 cm def /right 1 cm def /bottom 1 cm def /left 1 cm def end | |
(paper.ps) runlibfile | |
[ /Producer (Ruby Ghostscript - RGhost v0.8.7) /DOCINFO pdfmark /rows_per_page 80 def /count_pages 10 def /row_height 0.4 cm def /row_padding 0.1 cm def (basic.ps) runlibfile | |
(cursor.ps) runlibfile |
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
oxy:include silas$ brew doctor | |
Warning: Your Homebrew is not installed to /usr/local | |
You can install Homebrew anywhere you want, but some brews may only build | |
correctly if you install in /usr/local. Sorry! | |
oxy:include silas$ brew --config | |
HOMEBREW_VERSION: 0.9.3 | |
HEAD: 251ff3ceb5eb41d9724be16e1416f46874d03a6b | |
HOMEBREW_PREFIX: /Users/silas/opt | |
HOMEBREW_CELLAR: /Users/silas/opt/Cellar |
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
1.9.2p320 :039 > Redemption.includes(:referral_discount_code) | |
Redemption Load (0.3ms) SELECT `redemptions`.* FROM `redemptions` | |
ReferralDiscountCode Load (0.2ms) SELECT `discount_codes`.* FROM `discount_codes` WHERE `discount_codes`.`type` IN ('ReferralDiscountCode') AND `discount_codes`.`id` IN (38, 36, 37) | |
=> [#<Redemption id: 1, customer_id: 1, discount_code_id: 38, created_at: "2012-08-23 14:34:03", updated_at: nil>, #<Redemption id: 2, customer_id: 1, discount_code_id: 36, created_at: "2012-08-23 14:34:03", updated_at: nil>, #<Redemption id: 3, customer_id: 1, discount_code_id: 37, created_at: "2012-08-23 14:34:03", updated_at: nil>] | |
1.9.2p320 :040 > Redemption.includes(:referral_discount_code) |
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
<?PHP | |
header( 'HTTP/1.1 301 Moved Permanently' ); | |
header( 'Location: http://bedrocklinux.org' ); | |
?> |
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 perl | |
print "Status: 301 Moved Permanently\nLocation: http://bedrocklinux.org\n\n"; |
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
# using this for testing. | |
sudo -u postfix ~rails/bin/receive_email.sh < ~rails/apps/WebApp1/test/fixtures/test_email_1.eml |