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 / app.js
Last active Sep 6, 2019
Presign url
View app.js
if ($('[data-upload-widget="container"]').length) {
import(/* webpackChunkName: "UploadWidget" */ './modules/UploadWidget').then(m => m.default('[data-upload-widget="container"]'));
pavelloz /
Last active Oct 16, 2018
iron admin frontend perf
  • 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 /
Last active May 16, 2016
Simple d3.js bar chart
pavelloz /
Last active Apr 27, 2016
Pie Chart Labels with missing data

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 /
Created Apr 1, 2016
Bulletproof Test Suite
echo "Hello $(tput bold)$(whoami)!$(tput sgr0)"
echo 'Today we will be testing our app.'
sleep 2
echo '\033[1;32m....................................................\033[0m';
pavelloz /
Last active Nov 26, 2015
Superformula Explorer
View application.rb
config.assets.precompile += [
# precompile any CSS or JS file that doesn't start with _
pavelloz / compare.sass
Created May 14, 2015
Add color indicators depending on presence of its content
View compare.sass
display: inline-block
width: 1em
height: 1em
left: -1.2em
right: .2em
bottom: -0.1em
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"] {
You can’t perform that action at this time.