I like writing API wrappers, and I've actually written quite a few over the past year -- including ones for the EPA's API, the St. Louis FRED API, and the Rotten Tomatoes API. I also created a site (with an external API) to help add some panache to your boring Lorem Ipsum text.
This file contains hidden or 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 environments and their heroku git remotes | |
| ENVIRONMENTS = { | |
| :staging => 'myapp-staging', | |
| :production => 'myapp-production' | |
| } | |
| namespace :deploy do | |
| ENVIRONMENTS.keys.each do |env| | |
| desc "Deploy to #{env}" | |
| task env do |
This file contains hidden or 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
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
This file contains hidden or 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
| ######################################### | |
| # Very basic rack application showing how to use a router based on the uri | |
| # and how to process requests based on the HTTP method used. | |
| # | |
| # Usage: | |
| # $ rackup rack_example.ru | |
| # | |
| # $ curl -X POST -d 'title=retire&body=I should retire in a nice island' localhost:9292/ideas | |
| # $ curl -X POST -d 'title=ask Satish for a gift&body=Find a way to get Satish to send me a gift' localhost:9292/ideas | |
| # $ curl localhost:9292/ideas |
This file contains hidden or 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
| function nestCollection(model, attributeName, nestedCollection) { | |
| //setup nested references | |
| for (var i = 0; i < nestedCollection.length; i++) { | |
| model.attributes[attributeName][i] = nestedCollection.at(i).attributes; | |
| } | |
| //create empty arrays if none | |
| nestedCollection.bind('add', function (initiative) { | |
| if (!model.get(attributeName)) { | |
| model.attributes[attributeName] = []; |
This file contains hidden or 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 'rubygems' | |
| require 'bundler' | |
| Bundler.require | |
| require './application' | |
| namespace :assets do | |
| desc 'compile assets' | |
| task :compile => [:compile_js, :compile_css] do | |
| end |
This file contains hidden or 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
| # Public: A module to be mixed in another class with common methods to index | |
| # records in ElasticSearch. | |
| # | |
| # The host object needs to respond to 'indexed_attributes', which will return | |
| # an array of the attributes names to be indexed. | |
| # | |
| # It's also recommended to override the 'save?' method to make sure only | |
| # records that match some specifications are indexed. | |
| # | |
| # The type used for the ElasticSearch index will be extracted from the name of |
This file contains hidden or 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
Show hidden characters
| # Get Sublime Text to use your rvm ruby without hardcoding a `$USER`. | |
| # | |
| # Include the configurations below the commend in the appropriate file listed below: | |
| # | |
| # - OS X ST2: ~/Library/Application Support/Sublime Text 2/Packages/Ruby/Ruby.sublime-build | |
| # - OS X ST3: ~/Library/Application Support/Sublime Text 3/Packages/User/Ruby.sublime-build | |
| # - Linux ST2: ~/.config/sublime-text-2/Packages/Ruby/Ruby.sublime-build | |
| # - Linux ST3: ~/.config/sublime-text-3/Packages/User/Ruby.sublime-build | |
| { |
This file contains hidden or 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
| " The custom ignore feature in ctrlp.vim is a useful feature | |
| " when you want to ignore files and folder in your directory | |
| " structure. However if yo set g:ctrlp_user_command then | |
| " g:ctrlp_custom_ignore had no effect. This is all well and | |
| " and good unless you use a vim distribution like spf13-vim | |
| " that just so happens to set g:ctrlp_user_command. So here | |
| " is how you get around that issue in your own .vimrc.local: | |
| " | |
| " unlet the original spf13-vim settings | |
| unlet g:ctrlp_custom_ignore |
Here are all of the resources mentioned by Deconstruct 2017 speakers, along with who recommended what. Please post a comment if I missed something or have an error!
- Seeing Like a State by James Scott
- Public Opinion by Walter Lippmann (Evan Czaplicki)
- A Pattern Language by Christopher Alexander (Brian Marick)
- Domain Driven Design by Eric Evans (Brian Marick)
OlderNewer