Skip to content

Instantly share code, notes, and snippets.

@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();
@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 / 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 / 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 / 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 / routeConfigService.coffee
Last active January 4, 2016 03:38
Gain access to the angular ui router at runtime
angular.module('app').provider 'RouteConfig',
['$stateProvider', ($stateProvider) ->
# this will configure the routes from the received json
# using $stateProvider.state() like in app.config
configurator = ($http) -
console.log $stateProvider
updateRoutes: ->
configService.get().then (conf) ->
# add routes here from 'conf'
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html class="htmlclass" leuke="attribute">
<head class="headclass">
<title>page 1</title>
</head>
<body>
<h1>Pagina spandiv</h1>
<h2>SPAN with input</h2>
@Elexy
Elexy / Longer log with several ocurances
Last active August 29, 2015 14:13
Ejabberd log with session terminate
2015-01-09 18:16:44.089 [debug] <0.2648.0>@ejabberd_router:do_route:322 route
from {jid,<<>>,<<"localhost">>,<<>>,<<>>,<<"localhost">>,<<>>}
to {jid,<<"agent1">>,<<"localhost">>,<<"cb_operator_1420818758533">>,<<"agent1">>,<<"localhost">>,<<"cb_operator_1420818758533">>}
packet {xmlel,<<"iq">>,[{<<"id">>,<<"1593051025">>},{<<"type">>,<<"get">>}],[{xmlel,<<"ping">>,[{<<"xmlns">>,<<"urn:xmpp:ping">>}],[]}]}
2015-01-09 18:16:44.090 [debug] <0.2648.0>@ejabberd_local:do_route:296 local route
from {jid,<<>>,<<"localhost">>,<<>>,<<>>,<<"localhost">>,<<>>}
to {jid,<<"agent1">>,<<"localhost">>,<<"cb_operator_1420818758533">>,<<"agent1">>,<<"localhost">>,<<"cb_operator_1420818758533">>}
packet {xmlel,<<"iq">>,[{<<"id">>,<<"1593"...>>},{<<"type">>,<<...>>}],[{xmlel,<<...>>,...}]}
2015-01-09 18:16:44.091 [debug] <0.2648.0>@ejabberd_sm:do_route:514 session manager
from {jid,<<>>,<<"localhost">>,<<>>,<<>>,<<"localhost">>,<<>>}
PLAY [localhost] ***************************************************************
TASK [kargo-defaults : Configure defaults] *************************************
Friday 28 April 2017 10:00:15 +0200 (0:00:00.019) 0:00:00.019 **********
ok: [localhost] => {
"msg": "Check roles/kargo-defaults/defaults/main.yml"
}
TASK [bastion-ssh-config : set_fact] *******************************************
$ cat inventory/kubernetes.ini
#master01 ansible_ssh_host=master01.vanlanschot.cobrowser.com
master02 ansible_ssh_host=master02.vanlanschot.cobrowser.com
node101 ansible_ssh_host=node101.vanlanschot.cobrowser.com
node102 ansible_ssh_host=node102.vanlanschot.cobrowser.com
node103 ansible_ssh_host=node103.vanlanschot.cobrowser.com
node104 ansible_ssh_host=node104.vanlanschot.cobrowser.com
node105 ansible_ssh_host=node105.vanlanschot.cobrowser.com
newnode ansible_ssh_host=new.vanlanschot.cobrowser.com