Skip to content

Instantly share code, notes, and snippets.

Engineer, I solve real-world problems with technology.

Pavel 'PK' Kaminsky kaminskypavel

Engineer, I solve real-world problems with technology.
Block or report user

Report or block kaminskypavel

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
kaminskypavel / script.js
Created Aug 19, 2019
lerna add multiple packages
View script.js
// they say that laziness is the mother of all inventions
// lerna is currently not supporting multiple packages add (as mentioned here
// run this script and copy its output
'dotenv express cors ...put more of your packages here..'
.split(' ')
.map(e => `lerna add ${e} --scope=my-package --no-bootstrap`)
View export-html-table-to-csv.js
// based on table2CSV ( and
// paste in console.
(function () {
jQuery.fn.table2CSV = function (options) {
var options = jQuery.extend({
separator: ',',
header: [],
headerSelector: 'th',
columnSelector: 'td',
kaminskypavel / query.txt
Last active Aug 26, 2017
mysql range bucketing values
View query.txt
SET @bucketSize = 100;
CONCAT(a.bucketCeil, ' - ', a.bucketCeil) as bucket,
count(*) as count
from (
floor(d.value/@bucketSize)*@bucketSize as bucketFloor,
floor(d.value/@bucketSize)*@bucketSize + @bucketSize as bucketCeil
You can’t perform that action at this time.