Skip to content

Instantly share code, notes, and snippets.

Jakub Chodorowicz chodorowicz

Block or report user

Report or block chodorowicz

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
chodorowicz / 0_reuse_code.js
Created Jun 22, 2014
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
chodorowicz /
Created Jun 22, 2014 — 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
chodorowicz / loader.php
Last active Aug 29, 2015
WordPress resources loader | #PHP #WordPress
View loader.php
class Loader {
private $theme_uri;
private $theme_dir;
function __construct($theme_uri, $theme_dir) {
$this->theme_uri = $theme_uri;
$this->theme_dir = $theme_dir;
chodorowicz / gulp-pipes-sharing.js
Created Nov 21, 2014
gulp pipe sharing using lazypipe
View gulp-pipes-sharing.js
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var coffee = require('gulp-coffee');
var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');
var lazypipe = require('lazypipe');
// give lazypipe
var jsTransform = lazypipe()
View webpack.config.js
module.exports = {
entry: [ __dirname + '/app/js/App.jsx'],
output: {
path: __dirname + '/web',
filename: 'bundle.js'
module: {
loaders: [{
test: /\.jsx$/,
loader: 'jsx-loader?insertPragma=React.DOM&harmony'
chodorowicz / webpack.config.js
Created Jun 23, 2015
webpack react babel config
View webpack.config.js
module.exports = {
entry: [ __dirname + '/app/js/main.jsx'],
output: {
path: __dirname + '/web',
filename: 'bundle.js'
module: {
loaders: [{
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
chodorowicz / ProductDetail.jsx
Last active Aug 29, 2015
Get single item in Alt (Flux) + React
View ProductDetail.jsx
var React = require("react");
var ProductsStore = require('../../stores/ProductsStore');
function getState(id) {
var product = ProductsStore.getProduct(id);
return {
product: product
chodorowicz / LoginStore.js
Last active Aug 29, 2015
alt bind public methods strategies
View LoginStore.js
class LoginStore {
constructor() {
this.isLoggedIn = false;
this.bindActions(LoginActions); = 'John';
this.surname = 'Snow';
getIsLoggedIn: () => this.isLoggedIn,
getFullName: () => this.getFullName(),
chodorowicz / gist:c4657d7f1fd353a7bd8b
Last active Aug 29, 2015 — forked from BinaryMuse/gist:3b0a4ba166ac81840cab
Async fetches initiated by the store when necessary
View gist:c4657d7f1fd353a7bd8b
// Component
var AnswerDisplay = React.createClass({
mixins: [FluxMixin, StoreWatchMixin("answer")],
getStateFromFlux() {
var flux = this.getFlux(),
answerStore ="answer");
return {
View gist:496504
// $('',this).imagesLoaded(myFunction)
// execute a callback when all images have loaded.
// needed because .load() doesn't work on cached images
// mit license. paul irish. 2010.
// webkit fix from Oren Solomianik. thx!
// callback function is passed the last image to load
// as an argument, and the collection as `this`
You can’t perform that action at this time.