Skip to content

Instantly share code, notes, and snippets.


Krzysztof Koziarski kkoziarski

View GitHub Profile
kkoziarski / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
kkoziarski /
Last active Aug 29, 2015 — forked from jookyboi/
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.


  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
kkoziarski /
Last active Aug 29, 2015 — forked from jookyboi/
CSS libraries and guides to bring some order to the chaos.


  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.


kkoziarski / CustomConvert.cs
Created Nov 27, 2014
Convert To CSV & Excel
View CustomConvert.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Text;
using System.Data;
using System.Reflection;
using NPOI.HSSF.UserModel;
using NPOI.HSSF.Util;
kkoziarski / querystring-by-name.js
Created Nov 28, 2014
Get query string by name
View querystring-by-name.js
// HELPERS (all kinds and types)
// Function for getting request query string params
// Source:
function getQueryStringByName(name) {
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)");
var results = regex.exec(window.location.href);
if (results == null)
return null;
View isnumber.js
function isInt(input) {
return !isNaN(input) && parseInt(input) == input;
//(parseFloat(value) == parseInt(value))
function isNumber(input) {
return !isNaN(parseFloat(input)) && isFinite(input);
View generate-guid.js
function guid() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
kkoziarski / parse-url.js
Created Nov 28, 2014
Parse URL parts - The Good Parts
View parse-url.js
var parse_url = /^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/;
var url = '';
var result = parse_url.exec(url);
var names = ['url', 'scheme', 'slash', 'host', 'port', 'path', 'query', 'hash'];
var blanks = ' ';
var i;
for (i = 0; i < names.length; i += 1) {
document.writeln(names[i] + ':' + blanks.substring(names[i].length), result[i]);
kkoziarski / textarea-resize.js
Created Nov 28, 2014
textarea - resize for content
View textarea-resize.js
$(document).ready(function() {
var $abc = $('#txtResolution1');
$abc.css("height", $abc.attr("scrollHeight"));
kkoziarski / Object.create.js
Last active Aug 29, 2015
Object.create - The Good Parts
View Object.create.js
//The method creates a new object that uses an old object as its prototype.
if (typeof Object.create !== 'function') {
Object.create = function (o) {
var F = function () {};
F.prototype = o;
return new F();
var another_stooge = Object.create(stooge);