Skip to content

Instantly share code, notes, and snippets.

View Thinkscape's full-sized avatar

Arthur Bodera Thinkscape

View GitHub Profile
@padraic
padraic / escaping-rfc.md
Created July 7, 2012 14:27
Escaping RFC for PHP Core - Basically Zend\Escaper in C

* Version: 1.0

* Date: 2012-09-18

* Author: Pádraic <padraic.brady.at.gmail.com>

* Status: Under Discussion

* First Published at: http://wiki.php.net/rfc/escaper

@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active April 26, 2024 23:26 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@ollyg
ollyg / logstash.conf
Created June 20, 2012 13:29
logstash config and filter to fully parse a syslog message (PRI, timestamp, host)
filter {
# strip the syslog PRI part and create facility and severity fields.
# the original syslog message is saved in field %{syslog_raw_message}.
# the extracted PRI is available in the %{syslog_pri} field.
#
# You get %{syslog_facility_code} and %{syslog_severity_code} fields.
# You also get %{syslog_facility} and %{syslog_severity} fields if the
# use_labels option is set True (the default) on syslog_pri filter.
grok {
type => "syslog-relay"
@i-blis
i-blis / hubic.rb
Created May 8, 2012 21:05
How to get Hubic Webdav credentials
#!/usr/bin/env ruby
# hubic.rb Get credentials to Webdav server of Hubic account
require 'httpclient'
require 'json'
require 'optparse'
require 'highline/import'
module Hubic
extend self
@inakiabt
inakiabt / extjs-capture.js
Created March 20, 2012 22:42 — forked from revolunet/extjs-capture.js
ExtJs debug : capture all events
// to capture ALL events use:
Ext.util.Observable.prototype.fireEvent = Ext.Function.createInterceptor(Ext.util.Observable.prototype.fireEvent, function(evt) {
var a=arguments;
console.log(this,' fired event ',evt,' with args ',Array.prototype.slice.call(a,1,a.length));
return true;
});
// to capture events for a particular component:
Ext.util.Observable.capture(
Ext.getCmp('my-comp'),
@jlong
jlong / jquery.autogrow.js
Last active February 27, 2020 08:39
Autogrow Textareas in jQuery
/*
* jquery.autogrow.js
*
* A plugin written for UserVoice that makes it easy to create textareas
* that automatically resize to fit their contents.
*
* Based on Scott Moonen's original code for Prototype.js:
*
* <http://scottmoonen.com/2008/07/08/unobtrusive-javascript-expandable-textareas/>
*
@juriansluiman
juriansluiman / Requirements.md
Created March 13, 2012 10:00
Requirements for an Assetic module in ZF2

Assetic module in ZF2

This file describes my opinion of the integration of a public asset management tool within Zend Framework 2. It doesn't necessarily involve Assetic, but because Assetic is the most advanced and most used tool, I will focus on that. There is already an alternative module for Assetic integration, but the configuration of this module strikes 100% against my opinion of usage patterns. Therefore I write this document, to open up the discussion about improvements of zf2-assetic-module or write an alternative module.

Main usage pattern

The people using asset management tools are probably the frontend developers, as they write the html code in views, layouts etc. Currently they use helpers like headLink, headScript and inlineScript to control the assets. Starting point for this text is their workflow should not change as much as possible.

This means, an Assetic module should override the view helpers plugin broker, providing al

@desandro
desandro / requestanimationframe.js
Created February 19, 2012 23:29 — forked from paulirish/rAF.js
requestAnimationFrame polyfill
/**
* requestAnimationFrame polyfill by Erik Möller & Paul Irish et. al.
* https://gist.github.com/1866474
*
* http://paulirish.com/2011/requestanimationframe-for-smart-animating/
* http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
**/
/*jshint asi: false, browser: true, curly: true, eqeqeq: true, forin: false, newcap: true, noempty: true, strict: true, undef: true */
@skyler
skyler / gist:1748751
Created February 6, 2012 01:09
gearmand init script
#!/bin/sh
### BEGIN INIT INFO
# Provides: gearmand
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the gearmand job queue
# Description: starts gearmand using start-stop-daemon
@Thinkscape
Thinkscape / PSR-0-final-proposal.md
Created September 22, 2011 10:30
PSR-0 Final Proposal (PHP Standards Working Group)

PSR-0 Final Proposal (PHP Standards Working Group)

The following describes the mandatory requirements that must be adhered to for autoloader interoperability.

Mandatory:

  • A fully-qualified namespace and class must have the following structure \ <Vendor Name> \ (<Namespace>)* \ <Class Name>
  • Each namespace must have a top-level namespace ("Vendor Name").
  • Each namespace can have as many sub-namespaces as it wishes.
  • Each namespace separator is converted to a DIRECTORY_SEPARATOR when loading from the file system.
  • Each "_" character in the CLASS NAME is converted to a DIRECTORY_SEPARATOR. The "_" character has no special meaning in the namespace.