Requires installed gitolite in /home/git and following directory structure
/var
/www
/apps
/hosts
/libs
/** | |
* Startup | |
*/ | |
public function startup() | |
{ | |
parent::startup(); | |
// plain text output when http request | |
$this->getHttpResponse()->setContentType('text/plain'); |
REGEDIT4 | |
[HKEY_CLASSES_ROOT\editor] | |
@="URL:editor Protocol" | |
"URL Protocol"="" | |
[HKEY_CLASSES_ROOT\editor\shell\open\command] | |
@="wscript \"C:\\bin\\scripts\\run-editor.js\" \"%1\"" |
DELIMITER ;; | |
DROP PROCEDURE IF EXISTS `normalize_foreign_key_name`;; | |
CREATE PROCEDURE `normalize_foreign_key_name`(IN `param_database_name` varchar(100) CHARACTER SET 'ascii', IN `param_table_name` varchar(100) CHARACTER SET 'ascii', IN `param_column_name` varchar(100) CHARACTER SET 'ascii') | |
BEGIN | |
DECLARE var_constraint_name_current VARCHAR(100); | |
DECLARE var_constraint_name_new VARCHAR(100); | |
DECLARE var_constraint_target_table VARCHAR(100); |
import java.util.Arrays | |
// BurstSort | |
// Cache-Conscious Sorting of Large Sets of Strings with Dynamic Tries | |
// http://goanna.cs.rmit.edu.au/~jz/fulltext/alenex03.pdf | |
class BurstLeaf(initSize: Int) { | |
var size: Int = 0 |
#!/bin/bash | |
current_branch="$(git symbolic-ref HEAD 2>/dev/null)" || current_branch="(unknown)" | |
current_branch=${current_branch##refs/heads/} | |
github_username="JanTvrdik" | |
github_token="..." | |
if [[ $current_branch = "(unknown)" ]] | |
then |
<?php | |
ob_start(function($s, $flag) { | |
if ($flag & PHP_OUTPUT_HANDLER_START) { | |
$e = new \Exception; | |
$s = nl2br("Output started here:\n{$e->getTraceAsString()}\n\n") . $s; | |
} | |
return $s; | |
}, 2); |
<?php | |
/** | |
* @param string $file | |
* @param callable $tryLoad (string $file, mixed & $data): bool | |
* @param callable $isExpired (string $file): bool | |
* @param callable $fallback (string $file): string | |
* @return mixed | |
*/ | |
function loadCacheFile($file, $tryLoad, $isExpired, $fallback) |
server { | |
listen 80; | |
server_name example.com; | |
root d:/webs/example.com/www; | |
index index.php index.html; | |
try_files $uri $uri/ /index.php?$args; | |
location ~ \.phpt?$ { | |
try_files $uri @missing; |
{ | |
"methodCalls": [ | |
{ | |
"class": "\\Mockery", | |
"method": "mock", | |
"position": 0, | |
"mask": "%s|\\Mockery\\MockInterface" | |
}, | |
{ | |
"class": "\\Nette\\DI\\Container", |