Skip to content

Instantly share code, notes, and snippets.

View phoet's full-sized avatar
:shipit:
Shippin Stuffs 🚀

Peter Schröder phoet

:shipit:
Shippin Stuffs 🚀
View GitHub Profile
@phoet
phoet / 1.9.3
Last active December 17, 2015 17:19
HTTPClient Ruby 2.0.0 linebreaks and encoding problem
1.9.3-p392:
require 'httpclient'
File.open('blupp.json', 'w') { |file| file.write(HTTPClient.new.get('http://picasaweb.google.com/data/feed/base/user/phoet6/?alt=json', follow_redirect: true).content)}
=> 174217
{"version":"1.0","encoding":"UTF-8","feed":{"xmlns":"http://www.w3.org/2005/Atom","xmlns$media":"http://search.yahoo.com/mrss/","xmlns$openSearch":"http://a9.com/-/spec/opensearchrss/1.0/","xmlns$gml":"http://www.opengis.net/gml","xmlns$georss":"http://www.georss.org/georss","id":{"$t":"http://picasaweb.google.com/data/feed/base/user/phoet6"},"updated":{"$t":"2013-05-13T21:13:08.361Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":"http://schemas.google.com/photos/2007#user"}],"title":{"$t":"Peter Schröder's Photo Gallery","type":"text"},"subtitle":{"$t":"","type":"text"},"icon":{"$t":"http://lh4.ggpht.com/-92-Sa2CMQdc/AAAAAAAAAAI/AAAAAAAAAAA/drlgH21pHbk/s64-c/105552962753029032136.jpg"},"link":[{"rel":"http://schemas.google.com/g/2005#feed","type":"application/atom+xml","href
@phoet
phoet / ottawa_owned_by_crazy_german_software_engineer.md
Last active December 18, 2015 05:59
drinks, food and other useful stuff in ottawa

I'm now working as as Software Developer at Shopify and this is the list of places I visited in Ottawa.

Food & Drinks

Fastfood

unless File.exists?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', '4.0.0'
gem 'sqlite3'
GEMFILE
system 'bundle'
end
@phoet
phoet / init
Last active December 19, 2015 13:59
OMG Rails4!
#! /usr/bin/env ruby
unless File.exists?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'computering', github: 'phoet/computering'
GEMFILE
system 'bundle'
end
@phoet
phoet / gist:6021600
Created July 17, 2013 15:23
deutsche blacklist
[
"schiss",
"schiß",
"schlamm",
"schlampe",
"schleim",
"schließm",
"schlitz",
"schlong",
"schluck",
@phoet
phoet / so_coded.md
Last active December 19, 2015 22:29
So Coded - A Web Conference in Hamburg

Hallo,

ich würde Euch gerne darauf aufmerksam machen, dass am 19. und 20. September in diesem Jahr erstmalig die "So Coded" Konferenz in der LOLA in Hamburg Bergedorf stattfindet.

Wenn ihr daran interessiert seid, dann könnt ihr hier mehr erfahren http://socoded.com/

Schöne Grüße, Peter Schröder

@phoet
phoet / acceptance_spec_helper.rb
Last active December 23, 2015 19:29
don't put all your stuff in /spec
require 'simplecov'
SimpleCov.command_name "acceptance"
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'rspec/autorun'
require 'capybara/rails'
require 'capybara/poltergeist'
@phoet
phoet / bahn.rb
Created September 24, 2013 20:25
scrub the deutsche bahn website for trains leaving hamburg main station to bergedorf
class Bahn
URL = 'http://reiseauskunft.bahn.de/bin/bhftafel.exe'
def initialize
@now = Time.now
@date = @now.strftime('%d.%m.%y')
@time = @now.strftime('%H:%M')
end
def scrape
@phoet
phoet / readme.md
Last active December 24, 2015 07:19
i am stupid and lazy, RubyMotion to the rescue!

responding to this conversation on twitter: https://twitter.com/phoet/status/383552370015485952

it would be awesome if the RubyMotion toolchain would help me fail fast when submitting stuff to apple.

i have had several issue when doing this in the past:

  • i used an ad_hoc profile for distrubition (don't know if it's possible to know from the certificate)
  • info_plist entries were empty
  • CFBundleShortVersionString was not set properly
  • Icons and LaunchImages were missing, had a bad format (not PNG) or the wrong resolution
unless File.exists?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', '4.0.0'
gem 'sqlite3'
GEMFILE
system 'bundle'
end