Skip to content

Instantly share code, notes, and snippets.

View croensch's full-sized avatar
🤠
out there

croensch

🤠
out there
  • Hella Gutmann Solutions
  • Freiburg im Breisgau, Germany
View GitHub Profile
@croensch
croensch / geometry.php
Created June 6, 2011 22:43
PHP Geometry
<?php
// config
error_reporting(-1);
ini_set('display_errors', 1);
header('Content-Type: text/plain; charset=utf-8');
// library
class Edge {
<?php
// Zend Framework Workaround
require_once('ZFWA\Db\Table\Row\Abstract.php');
require_once('ZFWA\Db\Table\Select\ColumnsWithoutFrom.php');
// That Table we want to start from
require_once('ThatTable.php');
// init Table
$ThatTable = new ThatTable();
// fetch Rowset/Row
$ThatRowset = $ThatTable->find(1);
@croensch
croensch / list-and-delete-track.cmd
Created December 3, 2011 12:49
mp4creator: list-and-delete-track (MP4 to M4A)
@echo off
SETLOCAL EnableDelayedExpansion
SET TOOL=mp4creator.exe
SET WD=%CD%
SET /P WD="%WD%\"
FOR /R "%WD%" %%F IN (*.mp4) DO (
echo ================================================================
echo %%~dpnF.m4a
echo ----------------------------------------------------------------
copy "%%~dpnF.mp4" "%%~dpnF.m4a" > nul
@croensch
croensch / foo_scoring.txt
Created April 26, 2012 16:28
Foobar2000 Scoring Column
/**
* a nice foobar2000 scoring algorithm,
* wich emphasizes half on a baseline of tags
* and the other half on the bitrate of MP3 or AAC
* with a slightly tricked curve for AAC (bonus)
* current max is 12 Points or 6 nice stars
*
* tipp: use php highlighter to edit
*/
# Scoring -v
@croensch
croensch / FirebugDoctrineLogger.php
Created June 12, 2012 12:27 — forked from snichme/gist:789589
A Doctrine logger for FireBug(FirePHP)
<?php
/**
* Doctrine logger for FireBug
*
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @author Magnus Andersson <[email protected]>
* @author Christoph Roensch
*
* @link https://gist.github.com/2917214
*/
@croensch
croensch / firebug-console-dummy.js
Created June 21, 2012 09:05
Firebug Console Dummy
/**
* Firebug Console
*/
(function (window) {
"use strict";
if (window.console) {
return;
}
function fn() {
}
@croensch
croensch / create.cmd
Created July 24, 2012 20:58
FLVExtract/MP4Creator: create (FLV to AAC to M4A)
@echo off
SETLOCAL EnableDelayedExpansion
SET TOOL=mp4creator.exe
SET WD=%CD%
SET /P WD="%WD%\"
FOR /R "%WD%" %%F IN (*.aac) DO (
echo ================================================================
echo %%~dpnF.m4a
echo ----------------------------------------------------------------
%~dp0%TOOL% -create="%%~dpnF.aac" "%%~dpnF.m4a"
@croensch
croensch / map-1.2-to-2.0.md
Last active August 29, 2015 14:02
sonar-php-2.0 rules

legend

old-tool:old-rule

new-name

wishlist

php_codesniffer:ValidDefaultValueNotAtEnd

?

@croensch
croensch / README.md
Last active August 29, 2015 14:04 — forked from gmarik/README.md

About

minimal example of using [phantomjs] with [qunit]

$ phantomjs run-qunit.js file://`pwd`/test.html
'waitFor()' finished in 200ms.
Tests completed in 21 milliseconds.
5 tests of 5 passed, 0 failed.

Installation

@croensch
croensch / sonar-javascript-rules.md
Last active August 29, 2015 14:05
sonar-javascript rules

XPath rules

undefined

undefined should not be assigned

``(//initialiser|//assignmentExpression)//unaryExpression//IDENTIFIER[@tokenValue="undefined"]```

var x = undefined; // bad
var x; // ok
x = undefined; // bad
if (x === undefined) { // ok*
 undefined = x; // totally NOT ok ;)