Requires installed gitolite in /home/git and following directory structure
/var
/www
/apps
/hosts
/libs
#!/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 | |
namespace SmartCMS; | |
use Nette, | |
Nette\Utils\Html; | |
class BootstrapHorizontalFormRenderer extends Nette\Forms\Rendering\DefaultFormRenderer | |
{ | |
public $wrappers = array( |
location /resize { | |
alias /tmp/nginx/resize; | |
set $width 150; | |
set $height 100; | |
set $dimens ""; | |
if ($uri ~* "^/resize_(\d+)x(\d+)/(.*)" ) { | |
set $width $1; | |
set $height $2; | |
set $image_path $3; |
public void handleBitmap(Bitmap image) { | |
int w = image.getWidth(), h = image.getHeight(); | |
int[] rgb = new int[w * h]; | |
byte[] yuv = new byte[w * h]; | |
image.getPixels(rgb, 0, w, 0, 0, w, h); | |
populateYUVLuminanceFromRGB(rgb, yuv, w, h); | |
} | |
// Inspired in large part by: |
<?php | |
class BaseForm extends Nette\Application\AppForm | |
{ | |
public function addDatePicker($name, $label = NULL, $cols = NULL, $maxLength = NULL) | |
{ | |
return $this[$name] = new Nette\Forms\DatePicker($label, $cols, $maxLength); | |
} | |
} |
<?php | |
namespace Nette\Templates; | |
use Nette\Object; | |
use Nette\String; | |
/** | |
* Another Latte Macros | |
* |