Skip to content

Instantly share code, notes, and snippets.

View Freeaqingme's full-sized avatar
💭
Hello? Is this thing on?

Dolf Schimmel Freeaqingme

💭
Hello? Is this thing on?
View GitHub Profile
@Freeaqingme
Freeaqingme / zf2-workflow.txt
Created September 14, 2012 20:11 — forked from weierophinney/zf2-workflow.txt
proposed workflow
We rename "master" to "develop"
We rename "release" to "master"
Thus "master" stays the default branch, which means most PRs will be made
against it.
Bugfixes are merged to:
- master
- develop
Features are merged to:
- develop
When develop looks like the next minor or major version:
#layout{
background-image: linear-gradient(bottom, #7D7D7D 42%, #FAFAFA 100%);
background-image: -o-linear-gradient(bottom, #7D7D7D 42%, #FAFAFA 100%);
background-image: -moz-linear-gradient(bottom, #7D7D7D 42%, #FAFAFA 100%);
background-image: -webkit-linear-gradient(bottom, #7D7D7D 42%, #FAFAFA 100%);
background-image: -ms-linear-gradient(bottom, #7D7D7D 42%, #FAFAFA 100%);
background-image: -webkit-gradient(
linear,
left bottom,
<?php
class ServiceManager extends ZendServiceManager
{
public function getSubClasses($class, $directOnly = true)
{
$class .= '\\';
$length = strlen($class);
$filtered = array();
$cNames = $this->getCanonicalNames();
dolf@dolf-ThinkPad-T530:~/Projects/WegenerApi$ php5 test.php
PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0
PHP Notice: Undefined variable: php_errormsg in /home/dolf/Projects/WegenerApi/test.php on line 5
PHP Stack trace:
PHP 1. {main}() /home/dolf/Projects/WegenerApi/test.php:0
NULL
string(32) "Undefined variable: php_errormsg"
@Freeaqingme
Freeaqingme / .bashrc
Last active December 12, 2015 09:09
My .bashrc
#!/bin/bash
# YELLOW="\[\033[0;33m\]"
black='\e[0;30m'
blue='\e[0;34m'
green='\e[0;32m'
cyan='\e[0;36m'
red='\e[0;31m'
purple='\e[0;35m'
brown='\e[0;33m'
require({
// The base path for all packages and modules. If you don't provide this, baseUrl defaults to the directory
// that contains dojo.js. Since all packages are in the root, we just leave it blank. (If you change this, you
// will also need to update `app.profile.js`).
baseUrl: '/',
// A list of packages to register. Strictly speaking, you do not need to register any packages,
// but you can't require "app" and get app/main.js if you do not register the "app" package (the loader will look
// for a module at <baseUrl>/app.js instead). Unregistered packages also cannot use the `map` feature, which
// might be important to you if you need to relocate dependencies. TL;DR, register all your packages all the time:
@Freeaqingme
Freeaqingme / gist:5011931
Created February 22, 2013 09:08
PHP: Log parse errors to syslog()
<?php
register_shutdown_function(function() {
$error = error_get_last();
if (!$error) {
return;
}
switch($error['type']){
case E_ERROR:
@Freeaqingme
Freeaqingme / gist:5026299
Created February 24, 2013 23:50
ZendServer MongoDB Packaging...
vagrant@houdini:~/tmp$ apt-get download php-5.4-mongo-zend-server
Get:1 Downloading php-5.4-mongo-zend-server 5.4.11+b1 [106 kB]
Fetched 106 kB in 0s (227 kB/s)
vagrant@houdini:~/tmp$ ar vx php-5.4-mongo-zend-server_5.4.11+b1_amd64.deb
x - debian-binary
x - control.tar.gz
x - data.tar.gz
vagrant@houdini:~/tmp$ tar xvf data.tar.gz
./
./usr/
@Freeaqingme
Freeaqingme / gist:5116149
Created March 8, 2013 12:28
My virtual host
<Virtualhost *:80>
VirtualDocumentRoot "/home/dolf/Projects/vhosts/%1/public"
ServerName vhosts.dev
ServerAlias *.dev
UseCanonicalName Off
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
ErrorLog "/var/log/apache2/vhosts-error_log"
<Directory "/home/dolf/Projects/*">
SELECT b1.id, b1.code
FROM brands b1 LEFT OUTER JOIN brands b2
ON (b1.code = b2.code AND b1.id > b2.id)
where b2.id is null
select a.*, (
SELECT b1.id
FROM brands b1 LEFT OUTER JOIN brands b2