Skip to content

Instantly share code, notes, and snippets.


Roko C. Buljan rokobuljan

View GitHub Profile
rokobuljan / _throttle-debounce.js
Created Aug 18, 2017
JS Throttle Debounce Functions
View _throttle-debounce.js
function throttle (cb, delay) {
let prevCall = +new Date();
return () => {
const time = +new Date();
if ((time - prevCall) >= delay) {
prevCall = time;
cb.apply(null, arguments);
rokobuljan / gist:504be05ab4faf050d074d22f77cb6748
Created Feb 4, 2018
Get Unicode HEX Value of a Special Character - for use in CSS, HTML, JavaScript
View gist:504be05ab4faf050d074d22f77cb6748
// Given a special character (• in this example), open up Developer Console and write
"•".charCodeAt(0).toString(16) // "2022"
/** Use like:
* •
* CSS:
rokobuljan /
Created Mar 11, 2019
Anagrams Finder - Python
"""Anagrams finder
rokobuljan (GitHub) MIT licenced.
A simple O(n) complexity script to find anagrams in an unsorted
dictionary of words.
Use like: words.txt word
Sample dictionary:
rokobuljan / columnify.js
Last active Jul 27, 2019
Pretty Print 2D Array data in terminal or console
View columnify.js
* columnify - Pretty Print 2D array to terminal or console
* @prop {Array} colsArr 2D array (table)
* @prop {Integer} tabs Number of max tabs (default 0)
* @return {String} Table-ordered values tab-separated with newlines
const columnify = (colsArr, tabs) => {
const cols = colsArr[0].length;
rokobuljan /
Created Aug 1, 2019
Automate Build Dist on Commit


Build your /dist files on git commit!
How it works, if changes (diff) are detected in the staging area for a specific folder (i.e: /src), will trigger npm run build and add the new/modified build files to that commit on-the-fly.


npm i -D pre-commit