Skip to content

Instantly share code, notes, and snippets.

View jperl's full-sized avatar

Jon Perl jperl

View GitHub Profile
exports.config = {
// The address of a running selenium server.
seleniumAddress: 'http://hub.browserstack.com/wd/hub',
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'chrome',
'browserstack.tunnel': 'true',
'browserstack.debug': 'true',
'browserstack.user' : process.env.BROWSERSTACK_USER,
@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'
@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: [
@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))
@clarle
clarle / js-frameworks.md
Created August 19, 2012 16:54
Mojito/Derby/Meteor comparison (Public WIP)

Next-generation JavaScript frameworks

Web application frameworks have been developing fast in the past few years, and as the technologies that they're built on top of get more advanced, each of these frameworks is able to provide newer features to help developers build more complex applications. This year, we've seen the release of a new class of application frameworks that takes advantage of JavaScript's ability to be both on the client and the server. What this allows these frameworks to do is provide both a new level of abstraction by sharing code between client and server, as well as embrace the benefits of both client-side rendering and server-side rendering.

For the end user, they get smooth, desktop-like responsiveness from client-side rendering, while still being able to maintain the SEO and accessbility benefits of server-side rendering. For developers, that means writing less boilerplate code, and being able to focus more on writing the application logic.

Today, there are three main framew

@laddi
laddi / gist:5403259
Created April 17, 2013 10:21
Meteor 0.6.x error
=> Meteor server restarted
/Users/laddi/Development/greenqloud/meteorqloud/apophis/.meteor/local/build/server/server.js:325
}).run();
^
TypeError: undefined is not a function
at app/packages/node-modules/server.js:2:12
at /Users/laddi/Development/greenqloud/meteorqloud/apophis/.meteor/local/build/server/server.js:286:12
at Array.forEach (native)
at Function._.each._.forEach (/Users/laddi/.meteorite/meteors/meteor/meteor/777e36650d30f4faae62fc5c5a38d3b9ede80f23/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
@RubaXa
RubaXa / jquery.event.scroll.js
Last active December 17, 2015 06:58
jQuery extension, add support `scrollstart` and `scrollend` events.
/**
* jQuery extension, add support `scrollstart` and `scrollend` events.
*
* @author RubaXa <trash@rubaxa.org>
* @github https://gist.github.com/RubaXa/5568964
* @license MIT
*
*
* @settings
* $.special.scrollend.delay = 300; // default ms
@Pent
Pent / gist:5793360
Last active December 18, 2015 13:58
Check Meteor for bundled or development environment
var path = Npm.require("path");
var base = path.resolve('.');
if (base == '/'){
base = path.dirname(global.require.main.filename);
}
var publicPath = path.resolve(base+'/public/');
var staticPath = path.resolve(base+'/static/');
@stbaer
stbaer / tinytest.api
Last active November 15, 2016 19:10
Meteor tinytest api
test.isFalse(v, msg)
test.isTrue(v, msg)
test.equal(actual, expected, message, not)
test.length(obj, len)
test.include(s, v)
test.isNaN(v, msg)
test.isUndefined(v, msg)
test.isNotNull
test.isNull
test.throws(func)
@sseveran
sseveran / ray_tune_reporter_hook.py
Created June 15, 2018 15:42
A Tensorflow hook for reporting state to ray-tune
import six
import tensorflow as tf
from tensorflow.python.framework import ops
from tensorflow.python.training import training_util
from tensorflow.python.training.session_run_hook import SessionRunArgs
class RayTuneReportingHook(tf.train.SessionRunHook):
def __init__(self, params, reporter):
self.reporter = reporter