Skip to content

Instantly share code, notes, and snippets.

pennyfx

  • Datmo
  • Sunnyvale, Ca
Block or report user

Report or block pennyfx

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am pennyfx on github.
  • I am pennyfx (https://keybase.io/pennyfx) on keybase.
  • I have a public key ASCbZr13uKlJ5Y4Ii5ypAHB8st_lsuq1_7YGJ4OqCOCq_go

To claim this, I am signing this object:

@pennyfx
pennyfx / gist:a7227e230e74e42ec558455f3d08824e
Last active Nov 1, 2017
apache bench like tester in node
View gist:a7227e230e74e42ec558455f3d08824e
var async = require('async');
var args = require('yargs').argv;
var request = require('request');
String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g, '');};
const concurrency = args.c || 1,
count = args.n || 100,
data = args.d,
verb = args.verb || 'GET',
View docker-snippets.md

Pass git commit to docker image

ARG GIT_COMMIT

ENV GIT_COMMIT ${GIT_COMMIT}
# pass git commit hash to container
View gist:8e5369f4a0b9bc478333
['3','4','3','7'].reduce(function(prev, item){
if(!Array.isArray(prev)){
prev = [prev];
}
if(prev.indexOf(item.toLowerCase())===-1){
prev.push(item.toLowerCase());
}
return prev;
})
View foo.css
::content(h1) {
color: green;
}
@pennyfx
pennyfx / gist:7379441
Created Nov 8, 2013
click eventsssssss
View gist:7379441
var clickTouch = false;
var clickHandler = function(e){
clickTouch = e.touches;
}
document.addEventListener('mousedown', clickHandler);
waitsFor(function(){
return clickTouch !== false;
View gist:7378881
var te = document.createEvent('TouchEvent');
var touch = document.createTouch(window, document, 0,0,0,0,0);
var touchList = document.createTouchList(touch);
te.initTouchEvent('touchstart', true, true, window, {}, false, false, false, false,touchList,touchList,touchList);
te.view = window;
te.altKey = false;
te.ctrlKey = false;
te.shiftKey = false;
te.metaKey = false;
document.dispatchEvent(te);
View gist:6896373
$(document).ready(function() {
var slidebox = $('x-slidebox')[0];
// go back a slide
document.getElementById('prevButton').addEventListener("click", function(){
slidebox.slidePrevious();
});
// go forward a slide
View gist:6503716
x-tooltip:not([orientation=top]):not([orientation=bottom]):not([orientation=left]):not([orientation=right])[_auto-orientation=right] {
x-tooltip[_auto-orientation=top]:not([orientation=top]):not([orientation=bottom]):not([orientation=left]):not([orientation=right]) {
@pennyfx
pennyfx / gist:6083408
Created Jul 25, 2013
Angular packages in Bower
View gist:6083408
angular git://github.com/angular/bower-angular.git
angular-mocks git://github.com/angular/bower-angular-mocks.git
angular-resource git://github.com/angular/bower-angular-resource.git
angular-scenario git://github.com/angular/bower-angular-scenario.git
angular-cookies git://github.com/angular/bower-angular-cookies.git
angular-sanitize git://github.com/angular/bower-angular-sanitize.git
angular-ui git://github.com/angular-ui/angular-ui.git
angular-bootstrap git://github.com/angular-ui/bootstrap-bower.git
angular-unstable git://github.com/johannestroeger/bower-angular-unstable.git
angular-ui-utils git://github.com/angular-ui/ui-utils.git
You can’t perform that action at this time.