Skip to content

Instantly share code, notes, and snippets.

View samhatoum's full-sized avatar

Sam Hatoum samhatoum

View GitHub Profile
@samhatoum
samhatoum / chrome-driver-troubleshooting.sh
Last active November 8, 2019 10:05
Troubleshoot / Debug Chromedriver Issues
# 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
@samhatoum
samhatoum / rename-all-files.sh
Created December 16, 2016 13:09
Rename all files bash one-liner
find . -name '*.es6.js' -print0 | xargs -0 -n1 bash -c 'mv "$0" "${0/.es6.js/.js}"'

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 / child-resolver.js
Last active January 9, 2019 16:51
GQL Child Resolver example
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 {