Skip to content

Instantly share code, notes, and snippets.

Avatar

Sam Hatoum samhatoum

  • Xolv.io
  • San Francisco / London
View GitHub Profile
@samhatoum
samhatoum / child-resolver.js
Last active Jan 9, 2019
GQL Child Resolver example
View child-resolver.js
const { ApolloServer, gql } = require('apollo-server');
// Construct a schema, using GraphQL schema language
const typeDefs = gql`
type Query {
hello: String
order(orderId: String!): Order
}
type Order {
View keybase.md

Keybase proof

I hereby claim:

  • I am samhatoum on github.
  • I am samhatoum (https://keybase.io/samhatoum) on keybase.
  • I have a public key ASABTKWQxZ1B5hcER0eHPAq3oqnIYASaHUcmHmSvvmnnUwo

To claim this, I am signing this object:

@samhatoum
samhatoum / rename-all-files.sh
Created Dec 16, 2016
Rename all files bash one-liner
View rename-all-files.sh
find . -name '*.es6.js' -print0 | xargs -0 -n1 bash -c 'mv "$0" "${0/.es6.js/.js}"'
@samhatoum
samhatoum / chrome-driver-troubleshooting.sh
Last active Nov 8, 2019
Troubleshoot / Debug Chromedriver Issues
View chrome-driver-troubleshooting.sh
# First start chromedriver from the console like this
chromedriver --url-base=wd/hub --verbose
# Then in another tab / window: issue a command to start a new chrome session via the JSON protocol
curl -XPOST http://localhost:9515/wd/hub/session -d '{"desiredCapabilities":{"browserName":"chrome"}}'
# If you can see a chrome window pop up, you're all set. If not, check the chromedriver output and fix your issue
You can’t perform that action at this time.