Skip to content

Instantly share code, notes, and snippets.

View hkdobrev's full-sized avatar

Harry Dobrev hkdobrev

View GitHub Profile
@hkdobrev
hkdobrev / hiddenFileInput.js
Created February 6, 2012 20:22
Hidden File Input jQuery Plugin
$.fn.hiddenFileInput = function () {
$.each(this.filter('input[type=file]'), function () {
var input = $(this),
parent = input.parent();
input.css({
opacity: 0,
width: parent.css('width'),
height: parent.css('height'),
position: 'absolute',
left: 0,
@hkdobrev
hkdobrev / error.php
Created January 11, 2012 23:42
Custom Kohana_Exception class for handling exceptions in production.
<?php defined('SYSPATH') OR die('No direct access allowed!');
class Controller_Error extends Controller_Layout {
public function before()
{
parent::before();
$this->response->status((int) $this->request->action());
@hkdobrev
hkdobrev / .htaccess
Created October 17, 2011 07:06
.htaccess rules for chrome frame
BrowserMatch MSIE ie
Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie