Requires installed gitolite in /home/git and following directory structure
/var
/www
/apps
/hosts
/libs
<?php | |
namespace Nette\Templates; | |
use Nette\Object; | |
use Nette\String; | |
/** | |
* Another Latte Macros | |
* |
<?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); | |
} | |
} |
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: |
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; |
<?php | |
namespace SmartCMS; | |
use Nette, | |
Nette\Utils\Html; | |
class BootstrapHorizontalFormRenderer extends Nette\Forms\Rendering\DefaultFormRenderer | |
{ | |
public $wrappers = array( |
#!/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 |
i386 : iPhone Simulator | |
x86_64 : iPhone Simulator | |
arm64 : iPhone Simulator | |
iPhone1,1 : iPhone | |
iPhone1,2 : iPhone 3G | |
iPhone2,1 : iPhone 3GS | |
iPhone3,1 : iPhone 4 | |
iPhone3,2 : iPhone 4 GSM Rev A | |
iPhone3,3 : iPhone 4 CDMA | |
iPhone4,1 : iPhone 4S |
<?php | |
namespace Vondra; | |
class GitBranchPanel implements \Nette\Diagnostics\IBarPanel | |
{ | |
public function getPanel() | |
{ | |
return ''; |
<?php | |
class Article extends Base { | |
function getUploadDir() { | |
# e.g. something like this | |
return "upload/articles/article-$this[id]"; | |
} | |
} |