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 'net/http' | |
require 'json' | |
require 'uri' | |
@token = '' | |
def list_files | |
ts_to = (Time.now - 30 * 24 * 60 * 60).to_i # 30 days ago | |
params = { | |
token: @token, |
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
updateItemBasedOnEditItemState : EditItemType -> Item -> Item | |
updateItemBasedOnEditItemState editItemType item = | |
let | |
stopEditing : { item | typeData : ItemTypeData } -> (Maybe.Maybe newEditState -> ItemTypeData) -> { item | typeData : ItemTypeData } | |
stopEditing item itemTypeDataWithoutEditState = | |
{ item | typeData = itemTypeDataWithoutEditState Nothing } | |
updateEditingState : { item | typeData : ItemTypeData } -> (Maybe.Maybe newEditState -> ItemTypeData) -> newEditState -> { item | typeData : ItemTypeData } | |
updateEditingState item itemTypeDataWithoutEditState editItem = | |
{ item | typeData = itemTypeDataWithoutEditState (Just editItem) } |
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
# Welcome | |
## Start with a Lambda | |
## Get to Hello, world | |
# What is a lambda | |
## Ruby Syntax | |
## Identity | |
## K | |
## GetFirst | |
## GetSecond |
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
Title: I don't know Prolog, and so can you | |
Abstract: Prolog is a wildly popular declarative logic programming language that all the hot startups and whiz kids are using these days. So, being neither a hot startup nor a whiz kid, I figured I'd learn it. In this talk, I'll share some of the early learnings I've had that can only be considered "mind-bending." | |
We'll look at a bit of the syntax, the solver model and then dive into some wild and crazy list operations. Finding all the combinatorial variations of a list using the function isMember? Yup! We'll do that. | |
If you are anything like me, and I know you are, you'll come away from this talk saying "I'm sold! PROLOG FOREVER!" |
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
ary = [ | |
1, | |
1, | |
1 | |
] | |
class Array | |
def remove_vals(*vals) | |
out = self.dup | |
__remove_vals(out, *vals) |
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
ary = [ | |
1, | |
1, | |
1 | |
] | |
class Array | |
def remove_vals(*vals) | |
return out if vals.empty? | |
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
# List of conferences | |
curl -d {} -H "Content-Type:application/json" https://eventboard.falafel.com/ConferenceService2/ConferenceListEx | |
# The 59 specifies the version according to the latest version that is present in the DataVersion attribute of the conference list above | |
curl http://cdn.eventboard.falafel.com/conferencecatalogs/codemash2014.59.data.json |
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
def method_missing(method, *args, &block) | |
if helper.respond_to?(method) | |
self.class_eval "def #{method}(*args, &block); helper.send('#{method}', *args, &block); end" | |
self.send(method, *args, &block) | |
else | |
super | |
end | |
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
Design Patterns often are discussed with a negative tone. We laugh at Java developers and their heavy classes with the patterns encoded in the name. After all, who wants to try to understand the AbstractBaseClassFactoryManager? But don't most Ruby developers spend their time in a framework that glorifies a select few patterns to the point where the idea of writing code outside these patterns is considered heretical? On the other hand, Evolutionary Design says we are supposed to let the design come out over time, listening to the feedback we get from the combination of tests and refactoring, planning as little ahead as possible. What's a developer to do? | |
Ideally, Design Patterns are used as communication, not construction, as description, not prescription. In this talk, we'll discuss using patterns as a goal, as guides when iterating and evolving our system's design. Rather than thinking "I'll solve this with a strategy pattern," we can say that our design is heading "towards a strategy pattern" or we ended u |
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
🐈 $ baseline up ruby | |
/Users/coreyhaines/Documents/codes/test/.baseline/Vagrantfile:14:in `<top (required)>': undefined method `configure' for Vagrant:Module (NoMethodError) | |
from /Users/coreyhaines/.rvm/gems/ruby-2.0.0-p247/gems/vagrant-1.0.7/lib/vagrant/config/loader.rb:115:in `load' | |
from /Users/coreyhaines/.rvm/gems/ruby-2.0.0-p247/gems/vagrant-1.0.7/lib/vagrant/config/loader.rb:115:in `block in procs_for_source' | |
from /Users/coreyhaines/.rvm/gems/ruby-2.0.0-p247/gems/vagrant-1.0.7/lib/vagrant/config.rb:41:in `block in capture_configures' | |
from /Users/coreyhaines/.rvm/gems/ruby-2.0.0-p247/gems/vagrant-1.0.7/lib/vagrant/config.rb:36:in `synchronize' | |
from /Users/coreyhaines/.rvm/gems/ruby-2.0.0-p247/gems/vagrant-1.0.7/lib/vagrant/config.rb:36:in `capture_configures' | |
from /Users/coreyhaines/.rvm/gems/ruby-2.0.0-p247/gems/vagrant-1.0.7/lib/vagrant/config/loader.rb:114:in `procs_for_source' | |
from /Users/coreyhaines/.rvm/gems/ruby-2.0.0-p247/gems/vagrant-1.0.7/lib/vagrant/config/loader.rb:51:in `block in set' |