Skip to content

Instantly share code, notes, and snippets.

View jeremypele's full-sized avatar

Jeremy PELE jeremypele

View GitHub Profile

GraphQL introspection query via curl

cat introspection_query.json

{ 
  "query": "query IntrospectionQuery {
      __schema {
        queryType { name }
        mutationType { name }
@jeremypele
jeremypele / gpg-signing.md
Created June 18, 2020 12:47 — forked from xavierfoucrier/gpg-signing.md
GPG signing with Git and Github Desktop

Hi Github users,

You can now signed your commits on Github using at least Git 2.18.0 and Github Desktop 1.6.1.

  1. Generate a GPG key and add it to Github: https://help.github.com/articles/generating-a-new-gpg-key (if you don't want to type a passphrase on every commit, you need to press "Enter" when the console will prompt you to type a passphrase)

  2. Configure Git properly by editing the .gitconfig file using the command line git config --global --edit in a terminal, then replace YOUR_GITHUB_EMAIL, YOUR_SIGNING_KEY and GPG_BINARY_PATH with your data

@jeremypele
jeremypele / gpg-signing.md
Created June 18, 2020 12:47 — forked from xavierfoucrier/gpg-signing.md
GPG signing with Git and Github Desktop

Hi Github users,

You can now signed your commits on Github using at least Git 2.18.0 and Github Desktop 1.6.1.

  1. Generate a GPG key and add it to Github: https://help.github.com/articles/generating-a-new-gpg-key (if you don't want to type a passphrase on every commit, you need to press "Enter" when the console will prompt you to type a passphrase)

  2. Configure Git properly by editing the .gitconfig file using the command line git config --global --edit in a terminal, then replace YOUR_GITHUB_EMAIL, YOUR_SIGNING_KEY and GPG_BINARY_PATH with your data

# coding: utf-8
$silentMode = false
$answer = ""
ARGV.each do|a|
if a == "--silentMode"
$silentMode = true
$answer = "a"
end
end
@jeremypele
jeremypele / nativescript-appium-example.ts
Last active January 5, 2019 19:33
nativescript-appium-example.ts
import { AppiumDriver, createDriver, SearchOptions } from 'nativescript-dev-appium'
import { runType } from 'nativescript-dev-appium/lib/parser'
import { Direction } from 'nativescript-dev-appium/lib/direction'
import { assert } from 'chai'
const isAndroid: string = runType.includes('android')
describe('E2E Specs', () => {
let driver: AppiumDriver
@jeremypele
jeremypele / nativescript-appium-wd-driver-example.ts
Created March 6, 2018 13:42
nativescript-appium-wd-driver-example.ts
import { AppiumDriver, createDriver, SearchOptions } from 'nativescript-dev-appium'
import { runType } from 'nativescript-dev-appium/lib/parser'
import { Direction } from 'nativescript-dev-appium/lib/direction'
import { assert } from 'chai'
describe('E2E Specs', () => {
let driver: AppiumDriver
before(async () => (driver = await createDriver()))
@jeremypele
jeremypele / dom-elements.txt
Created November 16, 2016 19:29
Count DOM elements on page
document.getElementsByTagName('*').length
@jeremypele
jeremypele / chrome_stable
Created November 7, 2016 17:00
Use latest version chrome
#!/bin/bash
function useStableChromeVersion {
curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb;
sudo dpkg -i google-chrome.deb;
sudo sed -i 's|HERE/chrome\"|HERE/chrome\" --disable-setuid-sandbox|g' /opt/google/chrome/google-chrome;
rm google-chrome.deb
}
useStableChromeVersion
@jeremypele
jeremypele / timings
Created August 6, 2015 13:07
[Chrome Snippets] Timing
/**
* Timing.js 1.0.4
* Copyright 2015 Addy Osmani
*/
(function(window) {
'use strict';
/**
* Navigation Timing API helpers
* timing.getTimes();
@jeremypele
jeremypele / robot.js
Created December 6, 2012 14:24
FidjyNator
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(50);