Skip to content

Instantly share code, notes, and snippets.

Paweł Kowalski pavelloz

  • Earth, Milky Way
Block or report user

Report or block pavelloz

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
@pavelloz
pavelloz / PrivateMethodsTesting.js
Last active Aug 29, 2015
Primitive way of unit testing public/private methods using module pattern
View PrivateMethodsTesting.js
var test = true;
var Module = (function() {
var Module = {
isTwoDigit: function(number1, number2) {
return privates.add(number1, number2) > 9;
}
}
@pavelloz
pavelloz / SetUpstream
Created Jul 16, 2014
Set upstream branch if doesnt exist yet on push
View SetUpstream
git config --add push.default current
@pavelloz
pavelloz / extend-vs-normal.sass
Created Dec 9, 2014
Extend vs Inline in SASS each
View extend-vs-normal.sass
// Standard each
$controllers: 'find' 'compare' 'predict' 'intelligence'
@each $ctrl in $controllers
.controller-#{$ctrl} > [class^="#{ctrl}"]
border: 1px solid #f00
// Standard each output
/*
.controller-find > [class^="ctrl"] {
@pavelloz
pavelloz / compare.sass
Created May 14, 2015
Add color indicators depending on presence of its content
View compare.sass
.compare-sidebar
[data-text-binding-target$="compare2"]:not(:empty):before,
[data-text-binding-target$="compare3"]:not(:empty):before
display: inline-block
width: 1em
height: 1em
margin:
left: -1.2em
right: .2em
bottom: -0.1em
View application.rb
config.assets.precompile += [
# precompile any CSS or JS file that doesn't start with _
/(^inline[^_\/]|\/[^_])[^\/]*.(js|css)$/,
...
@pavelloz
pavelloz / README.md
Last active Nov 26, 2015
Superformula Explorer
@pavelloz
pavelloz / test.sh
Created Apr 1, 2016
Bulletproof Test Suite
View test.sh
#!/bin/sh
echo
echo "Hello $(tput bold)$(whoami)!$(tput sgr0)"
echo
echo 'Today we will be testing our app.'
echo
sleep 2
echo '\033[1;32m....................................................\033[0m';
@pavelloz
pavelloz / README.md
Last active Apr 27, 2016
Pie Chart Labels with missing data
View README.md

This variation of a donut chart demonstrates how to add labels with lines and also works with missing/new data. Clicking on the button changes the displayed data.

forked from dbuezas's block: Pie Chart Labels with missing data

@pavelloz
pavelloz / README.md
Last active May 16, 2016
Simple d3.js bar chart
View README.md
You can’t perform that action at this time.