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
let rootValue = { | |
response: { | |
timing: { | |
fields: [] | |
} | |
} | |
} | |
const start = new Date().getTime(); | |
return graphql(schema, query, rootValue, variables).then(response => { |
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
angular.module('ymusica').controller('AlbumSearch', ['$scope', 'Albums', 'Artists', '$q', function($scope, albums, artists, $q) { | |
$scope.albums = []; | |
$scope.artists = []; | |
var terms = new Rx.Subject(); | |
$scope.searchMusic = terms.onNext.bind(terms); | |
terms.sample(250) |
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 MPQ path | |
path | |
end | |
class ReplayFile | |
def initailize path | |
@archive = MPQ(path) | |
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
import RelayStoreData from 'react-relay/lib/RelayStoreData'; | |
import RelayQueryPath from 'react-relay/lib/RelayQueryPath'; | |
import printRelayQuery from 'react-relay/lib/printRelayQuery'; | |
import {List,Map} from 'immutable'; | |
var REMOVE_KEYS = [ | |
'_storage' | |
]; |
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
const node = Relay.QL` | |
query { | |
node(id: $channelId) { | |
... on Channel { | |
joined | |
${JoinChannelMutation.getFragment('channel')} | |
} | |
} | |
} | |
`; |
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 akka.actor.Actor | |
// defining messages -- Object = singleton, case class = DTO (sorta, generally) | |
object Born | |
case class Evolve(numberOfNeighbors: Int) | |
object Status | |
// receive is the method that handles incoming messages. | |
// alive: Receive and dead: Receive are defining alternative ways to respond to messages | |
// these will be switched on during runtime |
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
## env.rb ## | |
PageObject.javascript_framework = :jquery | |
## login.rb ## | |
class LoginPage | |
include PageObject | |
## stuff for every page ## |
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
Imports System.Data.Entity | |
Imports System.ComponentModel.DataAnnotations | |
Imports System.ComponentModel.DataAnnotations.Schema | |
Public Class PartContext | |
Inherits DbContext | |
Public Sub New() | |
MyBase.New("Data Source=(local);Initial Catalog=TestDB;Trusted_Connection=True;") | |
End Sub |
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
const rootValue = { | |
user, | |
client, | |
...root, | |
__timing: [] // store the timing info in here -- sorta hacky! | |
} | |
return graphql(schema, query, rootValue, variables).then(response => { |
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
const hasRole = (role, next) => { | |
return (obj, args, ctx) => { | |
if (ctx.rootValue.user.hasRole(role)) { | |
next(obj, args, ctx); | |
} else { | |
return null; | |
} | |
} | |
} |
NewerOlder