Skip to content

Instantly share code, notes, and snippets.

@Elexy
Elexy / angular-hammer.coffee
Last active December 19, 2015 19:49
Testing hammer.js inside Angular app with Karma e2e testing. Include this file in your e2e config together with https://github.com/jtangelder/faketouches.js and you can simulate taps and doubletaps using this DSL extension. The other gestures are easily added... if you don't like the coffeescript just run it through http://js2coffee.org/ to get …
###
Usage:
hammer(selector).tap() trigger a Hammer Tap event
hammer(selector).doubleTap() trigger a Hammer DoubleTap event
###
angular.scenario.dsl "hammer", () ->
hammerTime = {}
hammerTime.tap = () ->
@Elexy
Elexy / gauge.js
Created February 27, 2013 22:25 — forked from tomerd/gauge.js
function Gauge(placeholderName, configuration)
{
this.placeholderName = placeholderName;
var self = this; // some internal d3 functions do not "like" the "this" keyword, hence setting a local variable
this.configure = function(configuration)
{
this.config = configuration;
@Elexy
Elexy / HtmlForm.js
Last active December 13, 2015 17:58
Qooxdoo Mobile form submit with Iphone / ipad keyboard The idea is to create a html form that wraps the qx.ui.mobile.form.Form. The HTML form has a hidden submit button so that IOS recognizes the form as something it could submit with the keyboard. I tested it on Ipad1 and on the desktop.
/* ************************************************************************
#use(qx.ui.mobile.core.EventHandler)
************************************************************************ */
/**
* This is the base class for all mobile widgets.
*/
qx.Class.define("sgmobile.widget.HtmlForm", {
@Elexy
Elexy / custom.php
Created May 16, 2012 12:36
orchestra cron job
<?php
class Cron_Custom
{
public $path = 'app/cron_15.php';
public $args = array();
}
@Elexy
Elexy / clear.php
Created May 8, 2012 14:43
Orchestra cleapscript
<?php
require_once __DIR__.'/../app/bootstrap.php.cache';
require_once __DIR__.'/../app/autoload.php';
use Symfony\Component\HttpKernel\Util\Filesystem;
try
{
echo "clearing cache....\n";
$file = new Filesystem();