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
echo "redoing aliases" | |
# alias to reload aliases in your current window | |
alias real=". ~/kagemusha/aliases/aliases" | |
# specific things i'm currently working on | |
alias rspet="rspec spec/controllers/api/canvas/email_templates_controller_spec.rb" | |
alias rspes="rspec spec/controllers/api/canvas/email_sections_controller_spec.rb" | |
alias dlvw="dlv debug github.com/kagemusha/vowpal_websrv -- --workers 1 --models ./sample_models" | |
alias 58="lsof -i tcp:5858" |
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
// id SERIAL primary key | |
CREATE TABLE public.user_events | |
( | |
id serial primary key, | |
campaign_id bigint NOT NULL, | |
user_uuid bigint NOT NULL, | |
reward integer NOT NULL | |
) |
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
1. If you are trying to `go get` a private repo, you need to be able to enter your `username` and `password` from the prompt. | |
To get the prompt you need to enable the git terminal prompt. | |
env GIT_TERMINAL_PROMPT=1 go get 'github.com/the-user/the-repo' | |
2. Because of 2FA you cannot use your password. You need to generate an access token and enter that in the password field | |
instead (you will want to copy at the clipboard on the token generation page, b/c it will be long). To generate the token, go | |
to [https://github.com/settings/tokens/new](https://github.com/settings/tokens/new). Or from the Github UI, | |
` Setting - Developer Settings - Personal access tokens` |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
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
defmodule PhoenixTimeline.Game do | |
... | |
schema "games" do | |
belongs_to :winner, PhoenixTimeline.Player | |
has_many :players, PhoenixTimeline.Player | |
... | |
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
1. install rack-cors gem (https://github.com/cyu/rack-cors) | |
gem 'rack-cors', :require => 'rack/cors' | |
2. add to application.rb | |
config.middleware.insert_before "Rack::Lock", "Rack::Cors", :debug => true, :logger => Rails.logger do | |
allow do | |
origins '*' |
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
store.getById | |
sync return rec from store if avail or return null | |
e.g. | |
var post = store.getById('post', 1); | |
filter: function(type, query, filter) | |
@param {Class} type | |
@param {Function} filter |
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
In general: | |
1. somepropBinding=val => someprop=val | |
2. except for classNameBindings | |
e.g. classNameBindings=":option isSelected:selected" | |
for example: | |
{{#linkTo | |
option.path | |
typeBinding=option.value |
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
https://github.com/emberjs/ember.js/pull/3182 |
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
version: grunt-cli v0.1.8 | |
1. Install node-inspector globally (-g) | |
npm install -g node-inspector | |
2. Add debugger statements to your code | |
3. Run your grunt task in debug mode |
NewerOlder