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 ruby | |
users = { | |
:rubiii => 'daniel.harrington', | |
:tri => 'thilko.richter', | |
} | |
user = users[ARGV.shift.to_sym] | |
message = ARGV.join(' ') |
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
# thx to tobstarr | |
sudo mkdir -p /usr/local && sudo chown -R $USER /usr/local && curl -Lsf http://bit.ly/9H4NXH | tar xvz -C/usr/local --strip 1 && brew install git |
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 ruby | |
[25021834, 18768647].each do |product_id| | |
url = "https://www.google.com/analytics/reporting/?reset=1&id=#{product_id}&pdr=#{(Time.now - (7 * 60 * 60 * 24)).strftime("%Y%m%d")}-#{Time.now.strftime("%Y%m%d")}" | |
`open "#{url}"` | |
end |
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
<jaxws:bindings version="2.1" wsdlLocation="service.wsdl" | |
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" | |
xmlns="http://java.sun.com/xml/ns/jaxws" xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" | |
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"> | |
<enableWrapperStyle>false</enableWrapperStyle> | |
<jaxws:bindings | |
node="wsdl:definitions/wsdl:types/xsd:schema[@targetNamespace='http://authentication.integration.crowd.atlassian.com']"> | |
<jxb:globalBindings generateElementProperty="false"> |
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
alias :method_missing_i_dont_give_a_shit :method_missing | |
def method_missing(sym,*args, &block) | |
puts "sym is #{sym}" | |
method_name = sym.to_s | |
if /.+\?$/ =~ method_name | |
puts "i dont care" | |
target_method = method_name[0..-2] | |
puts "target is #{target_method}" | |
puts self.class |
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
# Creates an object you can savely traverse without getting nil. | |
# This is very pleasant for deep data-structures. | |
# You can punch the duck until it should become a string: | |
# NilOr.new(nil).what.the.fuck?.to_s --> nil | |
class NilOr | |
def initialize(object, parent = nil) | |
@object = object | |
@call_stack = (parent || []) | |
puts "current stack #{@call_stack}" |
NewerOlder