[0.72.2]
- Initial version
[0.72.2]
class MethodChainer < BasicObject | |
def initialize(obj, deep_chain = false) | |
@obj = obj | |
@deep_chain = deep_chain | |
end | |
def __ | |
@obj.map { |e| e } | |
end |
#!/usr/bin/env ruby18 -wKU | |
def key_part(line) | |
match = line.match(/^\s*([^:]+)/) | |
return unless match | |
match.captures.first | |
end | |
def leading_spaces(line) | |
line.match(/^(\s*)\S?/).captures.first.length |
# what if… | |
class Config | |
def initialize(path) | |
@data = YAML.parse_file(path) | |
end | |
protected | |
def root_path | |
@root_path ||= @data['app']['root_path'] |
# Generate THE key
$ openssl genrsa -out mykey.pem 2048
# Generate the private key for the backend
$ openssl pkcs8 -topk8 -inform PEM -outform PEM -in mykey.pem -out private_key.pem -nocrypt
# Generate the public key for iOS
$ openssl rsa -in mykey.pem -pubout -outform DER -out public_key.der
Out of pure luck we found out that there is a coupon deal going on for the exact hotel where we will host all our speakers during the conference. We will announce our rates with them later but if you are quick you can grab a deal which saves you even more money!
You can buy a coupon for 2 nights in a double bed room in that hotel here for 110€.
Use that to book your stay from the 18th to the 20th. Another night from the 20th till the 21st then is just around 70€ as their rates over the weekend are much lower as during the week.
class WTF | |
attr_reader :color | |
def initialize | |
@color = 'red' | |
end | |
def color_with_self | |
color = self.color | |
color |
test "writing blog posts" do | |
testing {User.new} | |
helpers do | |
def write_post | |
subject.posts.new(title: …) | |
end | |
end | |
# describing certain expected behaviours that… |
// ==UserScript== | |
// @name Spiegel Online Video Smasher | |
// @match http://www.spiegel.de/* | |
// @version 1.0 | |
// ==/UserScript== | |
// From http://stackoverflow.com/questions/2588513 | |
var load,execute,loadAndExecute;load=function(a,b,c){var d;d=document.createElement("script"),d.setAttribute("src",a),b!=null&&d.addEventListener("load",b),c!=null&&d.addEventListener("error",c),document.body.appendChild(d);return d},execute=function(a){var b,c;typeof a=="function"?b="("+a+")();":b=a,c=document.createElement("script"),c.textContent=b,document.body.appendChild(c);return c},loadAndExecute=function(a,b){return load(a,function(){return execute(b)})}; | |
// Run the script within the original window to have access to jQuery |