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-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 / 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 / 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 / gist:e4e4c5717875a1e2b5ea
Created October 5, 2015 13:42
[JS] Modules namespacings
// Namespace creation method
function setNamespace (ns_string, ns) {
var parts = ns_string.split('.'),
parent = ns;
if (parts[0] === "App") {
parts = parts.slice(1);
}
var pl = parts.length;
for (var i = 0; i < pl; i++) {
//create a property if it doesnt exist
@jeremypele
jeremypele / ng_scopes_size
Created August 6, 2015 13:13
[Chrome Snippets] Ng-scopes-sizes
// Finds total size of objects attached to the scopes
(function ngScopeSize() {
var i, data, scope,
count = 0,
all = document.all,
len = all.length,
test = {},
scopes = 0;