Skip to content

Instantly share code, notes, and snippets.

View graphis's full-sized avatar

Zsolt Sándor graphis

View GitHub Profile
@graphis
graphis / FontInstaller.py
Created January 20, 2016 10:39 — forked from omz/FontInstaller.py
FontInstaller
# FontInstaller (by @olemoritz)
# This script installs a custom TTF font on iOS (system-wide).
# It can be used in one of two ways:
# 1. Simply run it in Pythonista, you'll be prompted for the URL of the font
# you'd like to install (if there's a URL in the clipboard, it'll be used by default)
# 2. Use it as an 'Open in...' handler, i.e. select this file in Pythonista's 'Open in...
# menu' setting. This way, you can simply download a ttf file in Safari and open it in
@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
/**
* Provides requestAnimationFrame in a cross browser way.
* @author paulirish / http://paulirish.com/
*/
if ( !window.requestAnimationFrame ) {
window.requestAnimationFrame = ( function() {
return window.webkitRequestAnimationFrame ||
@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 / 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;!
<?php
class Kostache_Layout_Base extends Kostache_Layout
{
protected $_options_title_selected = null;
/**
* Returns an options list of titles.
*
* @return array
@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()
{
@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 defined('SYSPATH') or die('No direct script access.');
class Controller_Example extends Controller {
public function action_index()
{
$this->request->response = new View_Example;
// or $this->response->body(new View_Example); in K3.1
}
@graphis
graphis / gist:4013780
Created November 4, 2012 21:05 — forked from ernestas/gist:1033461
KOstache layout in a layout
<?php defined('SYSPATH') or die('No direct script access.');
/**
* Mustache templates for Kohana.
*
* @package Kostache
* @category Base
* @author Jeremy Bush <[email protected]>
* @author Woody Gilk <[email protected]>
* @copyright (c) 2010-2011 Jeremy Bush
* @copyright (c) 2011 Woody Gilk