Skip to content

Instantly share code, notes, and snippets.

View snovakovic's full-sized avatar

Stefan Novaković snovakovic

  • Split 21000 Croatia
View GitHub Profile
@snovakovic
snovakovic / mergeMaster.bashrc
Created February 13, 2019 22:42
Small script to merge latest master code to provided feature branch (intended to be put in .bashrc file)
# In git controlled folder run from console as mergeMaster name-of-branch
mergeMaster() {
git checkout master &&
git pull &&
git checkout $1 &&
git pull &&
git merge master
}
@snovakovic
snovakovic / conndtional-polyfill-with-webpack.js
Created November 6, 2017 08:18
Include polyfills only if required by browser. (works with webpack)
// ___ Internal logic ___
/**
* Indication does browser have all required methods for application to work without polyfills
* @const {boolean}
*/
const ALL_FEATURES_SUPPORTED_BY_BROWSE = Boolean(window.Promise &&
window.Array.from &&
window.Array.prototype.includes &&
window.Map &&
@snovakovic
snovakovic / ubuntu_software_installer
Last active April 12, 2024 14:51
Bash script to install softwares on ubuntu
#!/bin/bash
# run it as sudo yes | sh ubuntu_software_installer.sh
# CURL
sudo apt-get install curl
# CHROME
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
@snovakovic
snovakovic / launch.json
Created August 10, 2017 07:15
vscode launch.json configuration for debugging mocha tests
{
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Run Tests",
"type": "node",
"request": "launch",
@snovakovic
snovakovic / zeromq_install.sh
Created May 31, 2017 19:28 — forked from cdjhlee/zeromq_install.sh
install zeromq in ubuntu 14.04
#!/usr/bin/bash
##############################################
#from http://zeromq.org/intro:get-the-software
##############################################
#get zeromq
wget http://download.zeromq.org/zeromq-4.0.5.tar.gz
#unpack tarball package
@snovakovic
snovakovic / avatar.vue
Last active June 1, 2020 17:28
Vue component for group avatar images
<template>
<section>
<div class="avatar-group" data-group-size="4">
<div class="avatar">
<img src="https://randomuser.me/api/portraits/women/10.jpg">
</div>
<div class="avatar">
<img src="https://randomuser.me/api/portraits/women/2.jpg">
</div>
<div class="avatar">
@snovakovic
snovakovic / .eslintrc
Last active May 12, 2016 09:15
eslint configuration
{
"extends": [
"eslint:recommended"
],
"env": {
"browser": true,
"jasmine": true
},
"ecmaFeatures": {
"blockBindings": true,
@snovakovic
snovakovic / .editorconfig
Last active May 8, 2016 12:52
Editorconfig
# This file is for unifying the coding style for different editors and IDEs.
# More information at http://EditorConfig.org
# No .editorconfig files above the root directory
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
@snovakovic
snovakovic / css-reset
Created March 18, 2015 20:22
Eric Meyers’ CSS reset and tested box-sizing fix popularized by Paul Irish.
/************************************************
CSS RESET
Eric Meyers’ CSS reset and tested
box-sizing fix popularized by Paul Irish.
************************************************/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,