This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* preg_match over given array with a defined pattern | |
* | |
* Example: | |
* | |
* $names = array( | |
* 'hans', | |
* 'dieter', | |
* 'peter', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# | |
# | |
cat /etc/apt/sources.list | perl -ne '$H{$_}++ or print' > /tmp/sources.list && sudo mv /tmp/sources.list /etc/apt/sources.list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://release.gitkraken.com/linux/gitkraken-amd64.deb | |
sudo dpkg -i gitkraken-amd64.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -L -sS https://getcomposer.org/composer.phar -o composer.phar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ImpEx { | |
private $data = null; | |
private $rawData = null; | |
private $processData = null; | |
private $profiles = null; | |
const CSV_DELIMITER = ','; | |
const CSV_DELIMITER_EXCEL = ';'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var loadJsFile = function (filename) { | |
var fileref = document.createElement('script') | |
fileref.setAttribute("type", "text/javascript") | |
fileref.setAttribute("src", filename) | |
if (typeof fileref != "undefined") { | |
document.getElementsByTagName("head")[0].appendChild(fileref) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*----------------------------------------------------- | |
Nextlevel Gridssystem - XGS | |
by Marco Bunge of rubymatrix.de <marco.bunge@rubymatrix-de>. | |
Based on 960gs (http://960.gs) | |
SASS Core | |
-------------------------------------------------------*/ | |
/* Grid Settings | |
---------------------------*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class View { | |
public function throwException($message){ | |
throw new Exception($message); | |
} | |
public function getPagesBySection($targetSection,$targetFolder,$decoratorCallback=null){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
interface Bootstrap { | |
public function setBootstrapper(Bootstrapper $object); | |
public function registerTask($name, $callable); | |
public function getTasks(); | |
} | |
interface Bootstrapper { | |
public function setParam($name,$value); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Profiler { | |
public $time = 0; | |
public $memory = 0; | |
public function startRecordTime(){ | |
$this->time = microtime(true); | |
} |
NewerOlder