Skip to content

Instantly share code, notes, and snippets.


Kamil Ogórek kamilogorek

Block or report user

Report or block kamilogorek

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile


Git is well-known and lately pretty popular version control system, which helps developers to take care of their codebases.

Unlike SVN, it's decentralised and it lets you work locally, without any internet access, what can save your precious time more often then you may actually think. On the other hand it beats Mercurial with it's massive number of functionalities, which may be sometimes overwhelming for some of the developers.

Git has conquered whole internet surprisingly fast, therefore we also decided to take an advantage of it in our current projects.

For a lot of developers teams, starting to work using brand new system rises a lot of questions, from among which, the most important one is how they should settle their workflow.

View gist:6586221
<code>$ mkdir [your-project]</code>
<code>$ cd [your-project]</code>
<code>$ git init</code>
<code>$ git remote add origin [repo-url]</code>
<code>$ touch (to create README file)</code>
<code>$ git add</code>
<code>$ git commit -m "Init commit"</code>
<code>$ git push origin master -u</code>
kamilogorek / diff.html
Created Oct 21, 2013
scoreunder/lodash 1.3.0 diff
View diff.html
<title>Scoreunder/LoDash Diff</title>
<style type="text/css">
body {
padding: 2em;
font: 18px Monaco;
.add {
background: rgba(0,255,0,0.1);
kamilogorek / lessphp-grunt-task.js
Created Nov 15, 2013
Task for building LESS files using LESSPHP
View lessphp-grunt-task.js
module.exports = function(grunt) {
'use strict';
var execSync = require('exec-sync');
lessphp: {
files: {
'path/to/source.less': 'path/to/compiled.css',
View thanksgivingScripting.js
(function makeThanksgivingHappen (wishes) {
function Thanks () {
this.given = false;
Thanks.prototype.give = function () {
this.given = true;
var thanks = new Thanks();
kamilogorek / livereload-snippet.html
Created Jan 12, 2014
Static node.js server with livereload
View livereload-snippet.html
<script>document.write('<script src="http://' + ( || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script>
kamilogorek / wait-for-images.js
Created Feb 5, 2014
Wait for all images to load before executing callback
View wait-for-images.js
'use strict';
module.exports = function (element, callback) {
var allImgsLength = 0;
var allImgsLoaded = 0;
var allImgs = [];
var filtered ='img'), function (item) {
if (item.src === '') {
return false;
kamilogorek /
Last active Aug 29, 2015
Hub Workflow Snippets
$ git remote add <username> <fork-url>
$ git fetch <username>
$ git checkout <PR-branch-name>
kamilogorek / quicksort.js
Last active Aug 29, 2015
Quicksort on 1.000.000 random elements within 0 – 1.000.000 range
View quicksort.js
* Quicksort implementation by Nicholas C. Zakas
var items = [];
for (var i = 0; i < 1000000; i++) {
items.push(Math.round(Math.random() * 1000000));
You can’t perform that action at this time.