Skip to content

Instantly share code, notes, and snippets.

View L2jLiga's full-sized avatar
🦐

Andrey Chalkin L2jLiga

🦐
View GitHub Profile
@L2jLiga
L2jLiga / calendar.css
Created December 1, 2017 12:31
Simple calendar
.calendar__wrapper {
display: flex;
flex-direction: row;
flex-wrap: wrap;
width: calc(45px * 7);
margin: 0 25px 25px;
}
.calendar__item {
@L2jLiga
L2jLiga / file-reader.js
Created December 1, 2017 12:35
AngularJS 1.6.x FileReader directive for async file uploading
(function () {
'use strict';
var utils = angular.module('utils');
utils.directive('fileReader', function (EVENTS) {
return {
restrict: 'A',
scope: {
@L2jLiga
L2jLiga / index.ts
Last active May 26, 2019 08:20
Simple DI example
import 'reflect-metadata';
const INSTANCE = Symbol('Getter for injectable instance');
function Injectable(service: any) {
const paramtypes: any[] = Reflect.getMetadata("design:paramtypes", service) || [];
const dependencies = paramtypes.map(type => type[INSTANCE]);
if (dependencies.some(value => value === undefined)) {