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
| import Ember from 'ember'; | |
| export default Ember.Controller.extend({ | |
| appName: 'Ember Twiddle', | |
| enumerableProperties: Ember.computed(function() { | |
| let list = []; | |
| for (var x in [1,2,3,4,5]) { | |
| list.push(x); | |
| } |
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
| #!/usr/bin/env ruby | |
| require 'net/http' | |
| require 'json' | |
| def create_deployment(sha) | |
| uri = URI('https://api.github.com/repos/envoy/garaje/deployments') | |
| req = Net::HTTP::Post.new(uri.path, { | |
| 'Content-Type' => 'application/json', | |
| 'Authorization' => "token #{ENV['GITHOUT_OAUTH_TOKEN']}" |
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
| FROM ubuntu:latest | |
| RUN apt-get -y update | |
| RUN apt-get upgrade --yes && apt-get install -y git && apt-get install -y curl | |
| RUN apt-get -y install sudo | |
| RUN apt-get -y install nodejs npm libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++ ffmpeg libgroove-dev zlib1g-dev libpng-dev | |
| RUN apt-get -y install redis-server | |
| RUN ln -s `which nodejs` /usr/bin/node | |
| RUN npm install -g n |
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
| sudo: required | |
| services: | |
| - docker | |
| language: node_js | |
| node_js: | |
| - "5.0.0" | |
| cache: |
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
| // jscs:disable requireSpread | |
| import V2Serializer from './v2'; | |
| import Ember from 'ember'; | |
| export default V2Serializer.extend({ | |
| _normalizeBossAndAssistant(resourceObject, object) { | |
| let bosses = window.server.schema.employeeAssistants.where({ | |
| assistantId: object.id | |
| }).models.mapBy('employee'); |
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
| /** | |
| * npm install inflected | |
| * find . -type f | xargs perl -pi -e 's/all\(\)\.length/all\(\)\.models\.length/g' | |
| * find . -type f | xargs perl -pi -e 's/all\(\)\.forEach/all\(\)\.models\.forEach/g' | |
| toArray | |
| * $ jscodeshift -t mirage-migrator.js tests/acceptance | |
| */ |
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
| curl -X GET http://localhost:3000/friends\ | |
| --data-urlencode 'page[page]=1'\ | |
| --data-urlencode 'page[limit]=1' | jq |
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
| curl -X GET http://localhost:3000/friends\ | |
| --data-urlencode 'filter[first-name]=Cyril'\ | |
| | jq '.data | map (.attributes."first-name")' |
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
| curl -X GET http://localhost:3000/friends\ | |
| --data-urlencode 'filter[id]=2,3' | jq '.data | map(.id)' |
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
| curl http://localhost:3000/friends?sort=-id,first-name\ | |
| | jq '.data | map(.attributes)' |