Skip to content

Instantly share code, notes, and snippets.

Jeremy PELE jeremypele

View GitHub Profile
@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-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 / 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 / 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
View gist:e4e4c5717875a1e2b5ea
// 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 Aug 6, 2015
[Chrome Snippets] Ng-scopes-sizes
View ng_scopes_size
// 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;
@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();
You can’t perform that action at this time.