Skip to content

Instantly share code, notes, and snippets.

View jperl's full-sized avatar

Jon Perl jperl

View GitHub Profile
@rkueny
rkueny / snx_install.sh
Created July 21, 2016 08:33
Checkpoint SNX VPN client installation shell script
mkdir temp && cd temp
# for linux 'amd64' architecture install those packages:
sudo apt-get install libx11-6:i386 libpam0g:i386 libstdc++5:i386 lib32z1 lib32ncurses5 lib32bz2-1.0
wget https://vpnportal.aktifbank.com.tr/SNX/INSTALL/snx_install.sh
sudo ./snx_install.sh
cd .. && rm -rf temp/
export const GoogleApi = function(opts) {
opts = opts || {}
const apiKey = opts.apiKey;
const libraries = opts.libraries || [];
const client = opts.client;
const URL = 'https://maps.googleapis.com/maps/api/js';
const googleVersion = '3.22';
let script = null;
@plurch
plurch / upsert.js
Created March 2, 2016 05:29
PostgreSQL 9.5 Upsert using Knex.js
exports.knex = require('knex')({
client: 'pg',
connection: {
host : '127.0.0.1',
user : 'your_database_user',
password : 'your_database_password',
database : 'myapp_test'
}
});
@BretFisher
BretFisher / .travis.yml
Created February 15, 2016 21:26
Travis-CI Docker Image Build and Push to AWS ECR
sudo: required #is required to use docker service in travis
language: php #can be any language, just php for example
services:
- docker # required, but travis uses older version of docker :(
install:
- echo "install nothing!" # put your normal pre-testing installs here
@TrevorJTClarke
TrevorJTClarke / BrowserDeviceInfo.js
Created September 1, 2015 17:52
A quick list of browsers and devices for use in testing. Chrome is used for all devices that need simulation.
var devices = [
{ name: 'Desktop - Huge', width: 2880, height: 1800, ratio: 2, type: 'desktop' },
{ name: 'Desktop - Extra Large', width: 1920, height: 1080, ratio: 1, type: 'desktop' },
{ name: 'Desktop - Large', width: 1440, height: 900, ratio: 1, type: 'desktop' },
{ name: 'Desktop - HiDPI', width: 1366, height: 768, ratio: 1, type: 'desktop' },
{ name: 'Desktop - MDPI', width: 1280, height: 800, ratio: 1, type: 'desktop' },
{ name: 'Laptop with HiDPI screen', width: 1440, height: 900, ratio: 2, type: 'desktop' },
{ name: 'Laptop with MDPI screen', width: 1280, height: 800, ratio: 1, type: 'desktop' },
{ name: 'Laptop with touch', width: 1280, height: 950, ratio: 1, type: 'desktop' },
{ name: 'Tablet - Portrait', width: 768, height: 1024, ratio: 1, type: 'tablet' },
@emdagon
emdagon / IncludeTemplate.coffee
Created May 1, 2015 20:08
Simple Component to include Meteor Templates on React Components
# see https://github.com/reactjs/react-meteor
# and https://github.com/jhartma/meteor-cjsx
@IncludeTemplate = React.createClass
componentDidMount: () ->
componentRoot = React.findDOMNode(@)
parentNode = componentRoot.parentNode
parentNode.removeChild(componentRoot);
Blaze.render @props.template, parentNode
@koba04
koba04 / .gitignore
Last active December 21, 2018 02:21
karma + mocha + browserify + babel + power-assert
node_modules/
@creeonix
creeonix / release
Last active August 29, 2015 14:16
#!/bin/bash
git stash
git checkout release
git pull --tags
git checkout master
git pull
last_version=$(git for-each-ref --sort=taggerdate --format '%(refname)' refs/tags | tail -1 | grep -Eo '\d{1,2}\.\d{1,2}\.')
patch_level=$(git for-each-ref --sort=taggerdate --format '%(refname)' refs/tags | tail -1 | grep -Eo '[0-9]{1,2}$')
patch_level=$((patch_level+1))
@jperl
jperl / gist:19d1322187b1756fe3e2
Created August 27, 2014 19:14
Grunt tasks to add and build crosswalk for cordova project using grunt shell
var crosswalk = {
folder: {
arm: 'tools/crosswalk-cordova-7.36.154.13-arm',
x86: 'tools/crosswalk-cordova-7.36.154.13-x86'
}
};
// https://crosswalk-project.org/#documentation/cordova/migrate_an_application
var addCrosswalk = {
command: [
@tatey
tatey / gist:10459627
Created April 11, 2014 11:19
script/e2e
#!/usr/bin/env ruby
#
# End to end tests.
#
# Starts the application server and BrowserStack tunnel in the background
# and then runs protractor. Stops the server and tunnel after protractor
# finishes.
require 'bundler/setup'
require 'dotenv'