Skip to content

Instantly share code, notes, and snippets.

@mbohovic
mbohovic / custom.netteForms.css
Last active December 30, 2015 22:29
Custom netteForms.js - show alert messages for Nette Framework
.form-alert {
position: relative;
top: 0;
left: 0;
z-index: 1010;
max-width: 276px;
padding: 1px;
text-align: left;
white-space: normal;
color: #b94a48;
@efedorenko
efedorenko / gist:2028193
Created March 13, 2012 11:22
Function for alpha blending
// Turns out this function already exists in Sass: mix(fg, bg, %) (http://d.pr/mGqa)
// Alpha blending
@function blend($bg, $fg) {
$r: red($fg) * alpha($fg) + red($bg) * (1 - alpha($fg));
$g: green($fg) * alpha($fg) + green($bg) * (1 - alpha($fg));
$b: blue($fg) * alpha($fg) + blue($bg) * (1 - alpha($fg));
@fprochazka
fprochazka / fastcgi.conf
Last active April 10, 2020 03:07
nginx config files
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
<?php
use Kdyby\Components\Grinder\Actions\ButtonAction;
use Kdyby\Components\Grinder\Actions\LinkAction;
/**
* Homepage presenter.
*/
@fprochazka
fprochazka / BaseModel.php
Created May 17, 2011 08:30
Psáno na aktuální Nette (master - 50c3c40)
<?php
abstract class BaseModel extends Nette\Object
{
/** @var NotORM */
protected $connection;
/**
<?php
/**
* @see https://github.com/HosipLan/Nette-addDynamic
*/
class CreatePresenter extends BasePresenter
{
protected function startup()
{