Skip to content

Instantly share code, notes, and snippets.

View justlstn's full-sized avatar
👨‍💻
Write some code. Sometimes it works

Viacheslav Matsenko justlstn

👨‍💻
Write some code. Sometimes it works
  • alao AG
  • Kharkiv, Ukraine
View GitHub Profile
@justlstn
justlstn / class_decorator.ts
Created May 9, 2020 22:22 — forked from remojansen/class_decorator.ts
TypeScript Decorators Examples
function logClass(target: any) {
// save a reference to the original constructor
var original = target;
// a utility function to generate instances of a class
function construct(constructor, args) {
var c : any = function () {
return constructor.apply(this, args);
}
@justlstn
justlstn / install-docker.sh
Created February 18, 2019 23:57 — forked from dweldon/install-docker.sh
Install docker CE on Linux Mint 18.3
#!/usr/bin/env bash
# https://docs.docker.com/install/linux/docker-ce/ubuntu/
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"
sudo apt-get update
sudo apt-get install docker-ce
# https://docs.docker.com/compose/install/
@justlstn
justlstn / simple-pagination.js
Created August 26, 2018 18:00 — forked from kottenator/simple-pagination.js
Simple pagination algorithm
// Implementation in ES6
function pagination(c, m) {
var current = c,
last = m,
delta = 2,
left = current - delta,
right = current + delta + 1,
range = [],
rangeWithDots = [],
l;
@justlstn
justlstn / fileUpload.vue
Created August 23, 2018 23:09 — forked from raisiqueira/fileUpload.vue
Simple file upload with Vue and Axios
<style>
input[type="file"]{
position: absolute;
top: -500px;
}
div.file-listing{
width: 200px;
}