Skip to content

Instantly share code, notes, and snippets.

Avatar

Jeremy PELE jeremypele

View GitHub Profile
View GraphQL introspection query via curl.md

GraphQL introspection query via curl

cat introspection_query.json

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

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 Jun 18, 2020 — forked from xavierfoucrier/gpg-signing.md
GPG signing with Git and Github Desktop
View gpg-signing.md

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

View nativescript_mac_setup.rb
# 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 Jan 5, 2019
nativescript-appium-example.ts
View 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 Mar 6, 2018
nativescript-appium-wd-driver-example.ts
View 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 Nov 16, 2016
Count DOM elements on page
View dom-elements.txt
document.getElementsByTagName('*').length
@jeremypele
jeremypele / chrome_stable
Created Nov 7, 2016
Use latest version chrome
View chrome_stable
#!/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 Aug 6, 2015
[Chrome Snippets] Timing
View timings
/**
* Timing.js 1.0.4
* Copyright 2015 Addy Osmani
*/
(function(window) {
'use strict';
/**
* Navigation Timing API helpers
* timing.getTimes();
View robot.js
//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);