Skip to content

Instantly share code, notes, and snippets.

View ioncreature's full-sized avatar
😻

Aleksandr ioncreature

😻
View GitHub Profile
@ioncreature
ioncreature / vending-machine.ts
Last active January 18, 2022 15:18
Printify interview
import * as assert from 'assert';
const coins = [1, 2, 5, 10, 20, 50, 100, 200].reverse();
type Coins = Map<number, number>;
interface Product {
name: string;
price: number;
}
@ioncreature
ioncreature / fire.js
Created March 14, 2017 14:51
TODO: rate of fire
'use strict';
class Fire {
/**
* @param {int} rate
*/
constructor(rate = 10) {
this.rate = rate;
'use strict';
/**
* @namespace Glip.EndToEndTests.Groups.Remove
*/
/**
* @testcase Notification Group removed.
* @memberOf Glip.EndToEndTests.Groups.Remove
* @id GL-15524
@ioncreature
ioncreature / gist:5006783
Last active December 14, 2015 01:29
Mustache grabbing example
/**
* @author Marenin Alexander
* February 2012
*/
define(
[
'components/mustache',
'text!./templates.htm'
],
@ioncreature
ioncreature / ES6_arrow_function_syntax.js
Created October 12, 2012 15:29
ES6 arrow function syntax
// You can check this with Google Traceur Compiller
// http://code.google.com/p/traceur-compiler/
class Test {
constructor(){
var self = this,
fn = () => this === self,
fnOld = function(){ return this === self };
console.log( 'fn', fn(), 'fnOld', fnOld() );
}