Skip to content

Instantly share code, notes, and snippets.

View ahoward's full-sized avatar
💭
probably outside if i'm not hacking.

ara.t.howard ahoward

💭
probably outside if i'm not hacking.
View GitHub Profile
@ahoward
ahoward / a.rb
Last active August 29, 2015 14:19
working with buckets across regions is just silly
def s3_any_client(&block)
client = Aws::S3::Client.new
begin
block.call(client)
rescue Aws::S3::Errors::Http301Error
client = Aws::S3::Client.new(:endpoint => 'https://s3.amazonaws.com')
block.call(client)
end
end
@ahoward
ahoward / a.html.erb
Created April 16, 2015 20:56
og: tags should be a first class citizen of any web site or application. sharing urls is part of the web today #FYI
<%
@layout.default.title = "Titile"
@layout.default.description = "Description"
@layout.default.author = "Author"
@layout.default.keywords = %w[ foo bar baz ]
@layout.default.image = App.url(image_path("og.png"))
if @content
begin
root :to => 'communities#index', :as => :root
scoped_community_routes = proc do
resources :topics do
end
resources :replies do
end
resources :profiles do
end
end
a-2:~/git/ahoward/systemu $ gem push pkg/systemu-2.6.5.gem
Pushing gem to https://rubygems.org...
Successfully registered gem: systemu (2.6.5)
a-2:~/git/ahoward/fucking_favicons $ gem push pkg/fucking_favicons-1.0.0.gem
Pushing gem to https://rubygems.org...
<html>
<head><title>500 Internal Server Error</title></head>
<body bgcolor="white">
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx</center>
</body>
</html>
@ahoward
ahoward / a.rb
Last active November 30, 2015 17:06
most developers are incapable of using unique indexes, if you don't understand what this does, please remove all 'validates_uniqueness_of' lines from your code base immediately
def organization!
user = self
attributes = {
:user_id => user.id,
:name => user.email,
:title => user.email
}
conditions = {
@ahoward
ahoward / a.sh
Created February 25, 2015 15:56
node.js is easy, but it's even easier with this ruby program, which is capable of generating any node program.
a:~ $ cat a.rb
(cb=proc{|*a| a.size < 42 ? cb.call('cb(', *a, ')') : a.join }).call(ARGV.shift).display
a:~ $ ruby a.rb 42
cb(cb(cb(cb(cb(cb(cb(cb(cb(cb(cb(cb(cb(cb(cb(cb(cb(cb(cb(cb(cb(42)))))))))))))))))))))
@ahoward
ahoward / a.rb
Last active August 29, 2015 14:13
# hash ordering, combined with conversion, is very fragile
#
[1] pry(Site::Page)> attributes = args.extract_options!.to_options!
=> {:_id=>"54c004cab5b417316f000011",
:title=>"Atque cum ullam aliquid omnis aut.",
:path=>"atque-cum-ullam-aliquid-omnis-aut",
:body=>
"![itaque](/fake/images/tumblr_lu5gt565uZ1qe2jero1_1280.png \"Explicabo voluptatum expedita voluptatem voluptates dignissimos ipsum.\")\r\n\r\nlist\r\n------\r\n\r\n* one\r\n* two\r\n* three\r\n\r\nhttp://dojo4.com\r\n\r\n\r\nOmnis in est dicta amet non. Laudantium voluptatibus placeat officiis non commodi maxime aut. Aut deserunt omnis quod et quo velit. Dignissimos optio laboriosam iusto quia neque quisquam. At sed et.\r\n\r\nAlias neque non sint ipsum itaque. Consectetur unde nesciunt fuga atque. Voluptas dolores aut pariatur laboriosam.\r\n\r\n# heading 1\r\n## heading 2\r\n### heading 3\r\n \r\nhttp://dojo4.com\r\n\r\n\r\nIusto et assumenda beatae optio deleniti provident. Est laborum id voluptatem. Harum quas a possimus nemo
@ahoward
ahoward / a.md
Last active August 29, 2015 14:13
my perspective

we need to realize that covering women's racing might not equal coving men's racing

pros can only race so much, if one wants to increase exposure one needs to look outside making today's female pro racers earn coverage by working harder than the boys