Skip to content

Instantly share code, notes, and snippets.

View hkdobrev's full-sized avatar

Harry Dobrev hkdobrev

View GitHub Profile
'use strict';
var path = require('path');
module.exports = function (grunt) {
// Load externally-defined tasks
grunt.loadTasks('tasks/grunt');
// Load grunt tasks automatically
@hkdobrev
hkdobrev / 0_reuse_code.js
Created April 1, 2014 12:37
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Keybase proof

I hereby claim:

  • I am hkdobrev on github.
  • I am hkdobrev (https://keybase.io/hkdobrev) on keybase.
  • I have a public key whose fingerprint is BF8F D83B EEC4 314A FDFF 6C02 A0E6 4406 2DD8 4926

To claim this, I am signing this object:

#!/usr/bin/env bash
# Colours picked from https://robinpowered.com/blog/best-practice-system-for-organizing-and-tagging-github-issues/
###
# Label definitions
###
declare -A LABELS
# Platform
@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
@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 / 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 / gist:2031902
Created March 13, 2012 21:42
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Selecting / Jumping

Ctrl+L select line (repeat to select next lines)
Ctrl+D select word (repeat select others occurrences in context for multiple editing)
@hkdobrev
hkdobrev / gist:2049057
Created March 16, 2012 08:04 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@hkdobrev
hkdobrev / insertion_sort.php
Created March 18, 2012 11:53
insertion sort
<?php
function insertion_sort($arr)
{
$length = count($arr);
for ($i = 1; $i < $length; $i++)
{
$value = $arr[$i];
$j = $i - 1;