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 / ironadmin.md
Last active Oct 16, 2018
iron admin frontend perf
View ironadmin.md
  • in general you dont want to load too much vendor scripts on pages that dont need it (see webpack code splitting + dynamic imports in webpack docs) and vendors css together (to save http requests) is usually also a good idea (but much easier maintainable when using npm+ (f.e. webpack), especially that css are render blocking
  • you might want to take a look whats inside jquery ui as it is a huge monolith and you probably use like 10% of it, from my experience usually jquery ui is best replaced with something that has been maintained in the last 3 years and is modularized, so you dont have trouble replacing it later on
  • you might want to take a look at slimming down fontawesome you load - by default its very heavy
  • loading only modules you need from bootstrap (both css and js wise) can make it a whole lot lighter
  • light version of normalize.css is included in bootstrap - since you load it in vendors.css, you probably dont need to include it separately
  • your bitmap images could use som
@pavelloz
pavelloz / README.md
Last active May 16, 2016
Simple d3.js bar chart
View README.md
@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 / 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 Nov 26, 2015
Superformula Explorer
View application.rb
config.assets.precompile += [
# precompile any CSS or JS file that doesn't start with _
/(^inline[^_\/]|\/[^_])[^\/]*.(js|css)$/,
...
@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
@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 / SetUpstream
Created Jul 16, 2014
Set upstream branch if doesnt exist yet on push
View SetUpstream
git config --add push.default current
You can’t perform that action at this time.