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
type Avatar { | |
# The original avatar URL | |
originalUrl: String @fake(type:avatarUrl, options: { imageCategory: people }) | |
# The thumbnail resized to 64x64px | |
- thumbnail64Url: String @fake(type:imageUrl, options: { imageWidth: 64, imageHeight: 64, randomizeImageUrl: true }) | |
+ thumbnail64Url: String @examples(values: ["http://example.com/image.jpg", "http://example.com/image2.jpg"]) | |
} |
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
loic@Loics-MacBook-Pro-32 ~/persistgraphql master npm run compile | |
> persistgraphql@0.3.1 compile /Users/loic/persistgraphql | |
> tsc | |
node_modules/@types/isomorphic-fetch/index.d.ts(23,14): error TS2300: Duplicate identifier 'BodyInit'. | |
node_modules/@types/isomorphic-fetch/index.d.ts(24,14): error TS2300: Duplicate identifier 'RequestInfo'. | |
node_modules/@types/isomorphic-fetch/index.d.ts(28,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'headers' must be of type 'any', but here has type 'string[] | Headers| { [index: string]: string; }'. | |
node_modules/@types/isomorphic-fetch/index.d.ts(30,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'mode' must be of type 'string', but here has type 'string | RequestMode'. | |
node_modules/@types/isomorphic-fetch/index.d.ts(31,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'credentials' must be of type 'string', but here has type 'string | RequestCredential |
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
# Save dyno formation state | |
heroku ps:scale > mydynoformation | |
# Scale dynos to 0 | |
heroku ps:scale $(heroku ps:scale | sed -E 's/=([0-9]+):/=0:/g') | |
# Scale dynos back to their original state | |
heroku ps:scale `cat mydynoformation` |
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
myMap is something like "OrderedMap { 3636: Map { stop: "2015-01-29T22:00:00.000-08:00", }, 3637: Map { stop: "2015-01-31T22:00:00.000-08:00", ... } }" | |
myMap.sort(function(a, b) { | |
if (moment(a.get('stop_at')).unix() > moment(b.get('stop_at')).unix()) { | |
return 1; | |
} else if (moment(a.get('stop_at')).toDate() < moment(b.get('stop_at')).toDate()) { | |
return -1; | |
} else { | |
return 0; | |
} |
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
#!/bin/sh | |
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".js\{0,1\}$") | |
if [[ "$STAGED_FILES" = "" ]]; then | |
exit 0 | |
fi | |
PASS=true |
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
@QQAdmin.module "Entities", (Entities, App, Backbone, Marionette, $, _) -> | |
class Entities.Person extends Entities.Model |
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
/*! | |
* jQuery lightweight plugin boilerplate | |
* Original author: @ajpiano | |
* Further changes, comments: @addyosmani | |
* Licensed under the MIT license | |
*/ | |
;(function ( $, window, document, 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
def subproduct? | |
!self.parent.blank? | |
end | |
def self.not_sub | |
returning [] do |value| | |
Product.each do |x| | |
if !x.subproduct? | |
value << x | |
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
rake aborted!rake aborted! | |
uninitialized constant Bundler | |
uninitialized constant Bundler | |
/home/loic/repos/plusandmore/releases/20100919162044/Rakefile:4/home/loic/repos/plusandmore/releases/20100919162044/Rakefile:4 | |
(See full trace by running task with --trace)(See full trace by running task with --trace) |
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
uninitialized constant Bundler | |
uninitialized constant Bundler | |
/home/loic/xxxx/releases/20100919162044/Rakefile:4 | |
/home/loic/xxxx/releases/20100919162044/Rakefile:4(See full trace by running task with --trace) |
NewerOlder