Skip to content

Instantly share code, notes, and snippets.

View frne's full-sized avatar

Frank Neff frne

View GitHub Profile
# The test environment we want to use (PHP 5.3)
language: php
php:
- 5.3
- 5.4
before_script:
# Packages installation
- sudo apt-get install -y --force-yes apache2 libapache2-mod-php5 php5-mysql php5-sqlite
# Apache webserver configuration
- echo "Alias /behat $(pwd)/web" | sudo tee -a /etc/apache2/sites-available/default
@frne
frne / auth_response.xml
Created February 16, 2012 13:19
ejabberd, BOSH und Strophe.js
<body xmlns="http://jabber.org/protocol/httpbind"
sid="e0408bf8d86f0a7f44afda59aa8f81b75d029bb6"
wait="60"
requests="2"
inactivity="30"
maxpause="120"
polling="2"
ver="1.6"
from="ymc-pg-ejabberd"
secure="true"
@frne
frne / pluginName.jquery.js
Created December 22, 2011 10:17
jQuery plugin pattern
/**
* jQuery plugin pattern
*
* An example or pattern for jQuery plugin authoring
*
*/
( function ( $ ) {
/**
@frne
frne / jsoverlay.css
Created November 22, 2011 19:08
jsOverlay - A function to overlay a webpage
#jsOverlay
{
background-color: #ffffff;
opacity: 0.7;
filter: alpha(opacity=70);
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
@frne
frne / count_utf8.js
Created November 11, 2011 15:56
Function to count bytes of a string (UTF8)
/**
* Function to fix native charCodeAt()
*
* Now, we can use fixedCharCodeAt("foo€", 3); for multibyte (non-bmp) chars too.
*
* @access public
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/charCodeAt
* @note If you hit a non-bmp surrogate, the function will return false
* @param str String Mixed string to get charcodes
* @param idx Integer Position of the char to get
@frne
frne / core.js
Created November 3, 2011 16:36
Require.js and AMD
/**
* Maps core module
*
* @access public
* @author Frank Neff
*/
define("maps/core",
[
// require jQuery
"./javascriptlibs/jquery.js",