Skip to content

Instantly share code, notes, and snippets.

View kuzmicheff's full-sized avatar

Andre Kuzmicheff kuzmicheff

View GitHub Profile
kuzmicheff / observer.js
Created September 16, 2017 16:16
Observer pattern implementation in JavaScript
function Click() {
this.handlers = []; // observers
Click.prototype = {
subscribe: function(fn) {
kuzmicheff / clockCtrl.js
Created September 16, 2017 16:19
Simple clock in AngularJS
var app = angular.module("myApp", []);
app.controller("myCtrl", function($scope, $interval) {
$scope.theTime = new Date().toLocaleTimeString();
$interval(function() {
$scope.theTime = new Date().toLocaleTimeString();
}, 1000);
kuzmicheff / greeter.html
Created September 16, 2017 16:23
Simple greeter in TypeScript
<title>TypeScript Greeter</title>
<script src="greeter.js"></script>
kuzmicheff / array-intersection.js
Created September 16, 2017 16:24
Array intersection in JavaScript
var arrayIntersection = function(firstArray, secondArray) {
var outputArray = [];
firstArray.forEach(function(firstArrayItem) {
secondArray.forEach(function(secondArrayItem) {
if (secondArrayItem === firstArrayItem) {
if (outputArray.length !== 0) {
if (outputArray.indexOf(secondArrayItem) === -1) {
kuzmicheff /
Created November 6, 2017 21:27
How to generate a self-signed TLS (SSL) certificate on Amazon Linux

Execute the following commands from the folder in which the certificate files need to be stored.

  1. openssl genrsa -des3 -passout pass:x -out server.pass.key 2048
  2. openssl rsa -passin pass:x -in server.pass.key -out server.key
  3. rm server.pass.key
  4. openssl req -new -key server.key -out server.csr
  5. openssl x509 -req -sha256 -days 365 -in server.csr -signkey server.key -out server.crt
kuzmicheff /
Created March 21, 2018 16:44
Docker intro: notes and commands
## List Docker CLI commands
docker container --help
## Display Docker version and info
docker --version
docker version
docker info
## Execute Docker image
kuzmicheff /
Last active July 19, 2018 17:31
Create Windows 10 installer on USB drive in macOS 10.13 High Sierra


  1. An empty USB drive with 8Gb or greater capacity. The drive must be formatted in the FAT32 (MS-DOS) file system. A non-empty drive will be formatted as part of the process and existing data will be lost.
  2. Windows 10 creation tool. When on a Mac computer, the tool is downloadable as an .iso disk image from the Microsoft's website.
  3. Terminal. The application is located in Macintosh HD > Applications > Utilities >


  1. Mount the disk image containing the creation tool by double clicking on it.
  2. Run diskutil list which lists all connected internal and external drives.
  3. Run diskutil eraseDisk MS-DOS "WINDOWS10" MBR disk2. The disk2 is the name of the USB drive from the results of diskutil list and is dependent on the number of drives connected to the system.
  4. Run cp -rp /Volumes/CCCOMA_X64FRE_EN-US_DV9/* /Volumes/WINDOWS10 to copy the contents of the .iso disk image to the USB