Skip to content

Instantly share code, notes, and snippets.

View graphis's full-sized avatar

Zsolt Sándor graphis

View GitHub Profile
@graphis
graphis / kostache-layout.php
Created November 4, 2012 21:11 — forked from lukemorton/kostache-layout.php
Basic HTML5 Mustache layout
<?php defined('SYSPATH') or die('No direct script access.');
class Kostache_Layout extends Kohana_Kostache_Layout {
public $app_id;
public $page_id;
public function charset()
{
<?php
class Kostache_Layout_Base extends Kostache_Layout
{
protected $_options_title_selected = null;
/**
* Returns an options list of titles.
*
* @return array
@graphis
graphis / controller
Created November 16, 2012 16:20
kohana
<?php defined('SYSPATH') or die('No direct script access.');
class Controller_Work extends Controller {
private $view;
private $content;
public function before()
{
// parent::before();
@graphis
graphis / Output
Created November 20, 2012 21:25 — forked from zombor/Output
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Testing</title>
</head>
<body>
<h1>Testing</h1>
<p>Hello &lt;foobar&gt;!
@graphis
graphis / 200.php
Created November 22, 2012 08:51 — forked from evanpurkhiser/200.php
<?php
class HTTP_Exception_200 extends HTTP_Exception {
protected $_status = 200;
protected $_response;
/**
* Set the response object to retur when requested from get_response
@graphis
graphis / new pjax 1.2 init
Created December 4, 2012 07:35
new pjax 1.2 init
/*
* new pjax 1.2 init
**/
function pjax_init()
{
$(document).pjax('a', '#content')
// 1
.on('pjax:beforeSend', function () { console.log('01 pjax:beforeSend'); })
/**
* Provides requestAnimationFrame in a cross browser way.
* @author paulirish / http://paulirish.com/
*/
if ( !window.requestAnimationFrame ) {
window.requestAnimationFrame = ( function() {
return window.webkitRequestAnimationFrame ||
@graphis
graphis / _htaccess
Last active September 14, 2015 10:57
root/index.php -- simple application bootstrap with some $path variables
RewriteEngine On
RewriteRule ^$ index.php [QSA]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,L]
@graphis
graphis / .htaccess
Last active September 14, 2015 11:02
CI: Simple .htaccess using mod_rewrite for CodeIgniter
<IfModule mod_rewrite.c>
RewriteEngine On
# !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading
# slashes.
# If your page resides at
# http://www.example.com/mypage/test1
# then use
# RewriteBase /mypage/test1/
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f