Skip to content

Instantly share code, notes, and snippets.


Miša Mаkaröv micmmakarov

View GitHub Profile
micmmakarov / game.js
Created Aug 5, 2020
Comedy game with flying
View game.js
// Declaration of constants
levels = [
title: "1: You make your coworkers laugh",
score: 0,
max: 30,
emoji: {
bomb: 9,
drink: 30,
micmmakarov / describe-lwc-component.js
Last active Jan 24, 2019
Scans the WLC component for it's API
View describe-lwc-component.js
// node describe-lwc-component.js ~/path/to/file
String.prototype.padding = function(n, c)
var val = this.valueOf();
if ( Math.abs(n) <= val.length ) {
return val;
var m = Math.max((Math.abs(n) - this.length) || 0, 0);
var pad = Array(m + 1).join(String(c || ' ').charAt(0));
micmmakarov / cherrychecker.rb
Created Jan 11, 2018
Script that checks if there're any forgotten cherrypicks
View cherrychecker.rb
require 'json'
# run from git repo. Make sure to pull first
# ~/cherrychecker.rb
# ~/cherrychecker.rb
# ~/cherrychecker.rb --slack
# ~/cherrychecker.rb compare=212-patch
View go_comfy_bot.js
warmMySpaceIfSomeoneMadeAColdRequest = function() {
last_request_is_make_cold = $($('.activity-grid')[0]).find('img').attr('src').includes('toohot');
if (last_request_is_make_cold) {
console.log("Someone triggered cold request. But don't worry, I'll heat it up for you!");
} else {
console.log('Last request was not the cold request');
micmmakarov / sudoku_ninja.js
Last active Feb 8, 2017
Fast Sudoku validator in Javascript via array addresses
View sudoku_ninja.js
Fast JS Sudoku validator implemented in Javascript via array addresses.
Check whether a 9x9 sudoku board is valid.
Sudoku is a game played on a 9x9 grid. The object of the game is to fill in every square on the grid with a number, 1-9, so that:
Every row contains the numbers 1-9
Every column contains the numbers 1-9
micmmakarov / throttle_puzzle.rb
Last active Oct 12, 2016
Solution for throttle puzzles
View throttle_puzzle.rb
class GetShots
def initialize(rate_limit, time_window)
@rate_limit = rate_limit
@time_window = time_window
@calls_count = 0
def get_shot(type, params)
@calls_count += 1
@invoked_at ||=
View gist:d73fafdcbbf627d0c0ec449cea0bde0f
scoped_key ='KEEN_MASTER_KEY', allowed_operations: ["read"], filters: [{ # master_key should be a variable that contains your Keen master key
'property_name' => '',
'operator' => 'eq',
'property_value' => # should be a variable that contains the customer ID
View Keen Event Data
View Test
require 'spec_helper'
require 'pry'
require 'pry-nav'
include Warden::Test::Helpers
feature 'Propack Order', :js => true do
background do
user = Factory.create(:user)
login_as(user, :scope => :user)
View gist:4720165
require "spec_helper"
puts "Hello, world!"
feature %q{
As a user
I want to be able to create
New Meetings
} do