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
I woke up knowing I didn't have heat. | |
It's something you just know if you have ever lived in a place with propane heating. | |
You wake up and the air feels still, and you hear the clicking of a pilot light and you know it's been doing that for a while | |
it was 3am | |
I layed there and listened to the clicking |
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
app.factory 'Project', [ | |
'$resource' | |
($resource) -> | |
Project = -> | |
@service = $resource('/api/projects/:projectId', {projectId: '@id'}) | |
return | |
Project::all = -> | |
@service.query() |
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
app.controller 'ProjectCtrl', [ | |
'$scope' | |
'Project' | |
($scope, Project) -> | |
$scope.project = Project.get(1) | |
console.log $scope.project.title | |
#=> undefined | |
] |
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
# opens up the latest migration from rails root | |
# typically use right after a generator | |
function vimm() { | |
for file in db/migrate/*; do [[ $file -nt $latest ]] && latest=$file; done; vim "$latest" | |
} |
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
multi_match: { | |
query: q, | |
fields: %W(title subtitle short_description body) | |
}, | |
bool: { | |
must: { match: { published: 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
# this: | |
%select{name: "recipe[recipe_season_id]"} | |
-for season in @recipe_seasons | |
%option{value: season.id, selected: season_option_select(season)}= season.name | |
# can be replaced with this: | |
= f.collection_select :season_id, @recipe_seasons, :id, :name | |
# Where `f` is the form object, `season_id` is the field of the object that you | |
# want to set,`@season` is the collection, `:id` is the method to call on |
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
run bundle install from "." | |
Fetching [email protected]:elasticsearch/elasticsearch-ruby.git | |
remote: Counting objects: 3689, done. | |
remote: Compressing objects: 100% (1847/1847), done. | |
remote: Total 3689 (delta 1945), reused 3411 (delta 1744) | |
Receiving objects: 100% (3689/3689), 657.75 KiB | 539.00 KiB/s, done. | |
Resolving deltas: 100% (1945/1945), done. | |
Fetching [email protected]:elasticsearch/elasticsearch-rails.git | |
remote: Counting objects: 1227, done. | |
remote: Compressing objects: 100% (457/457), done. |