Skip to content

Instantly share code, notes, and snippets.

View Akurganow's full-sized avatar
🇬🇪
In Georgia

Alexander Kurganov Akurganow

🇬🇪
In Georgia
View GitHub Profile
require('dotenv').config()
const path = require('path')
const { merge } = require('webpack-merge')
const { uniq, get } = require('lodash')
const Dotenv = require('dotenv-webpack')
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
module.exports = (config, { dev }) => merge(config, {
export type RuleId = number;
export type RuleStatus = 'Active' | 'Inactive';
export type RulePASType = 'BusinessHours' | 'AfterHours' | 'Custom';
export type RuleType = 'BusinessHours' | 'MailboxDefault' | 'Custom';
type GreetingType = 'Voicemail' | 'Introductory' | 'ConnectingAudio' | 'ConnectingMessage' | 'HoldMusic';
type PASAction =
| 'ForwardCalls'
| 'UnconditionalForwarding'
@Akurganow
Akurganow / storages.ts
Last active August 14, 2019 03:07
usePersistedState
export interface Storage {
getItem: (key: string) => string | null
setItem: (key: string, value: string) => void
removeItem: (key: string) => void
}
const fallback: Storage = {
getItem: (key: string): string | null => {
console.log(`This is fallback key "${key}" cannot be readed`)

Keybase proof

I hereby claim:

  • I am akurganow on github.
  • I am akurganow (https://keybase.io/akurganow) on keybase.
  • I have a public key whose fingerprint is EAC9 F021 B881 9CEF 576B 182B D215 37C0 ABDF 1A9F

To claim this, I am signing this object:

  • postcss-import — PostCSS plugin to transform @import rules by inlining content.
  • postcss-nested — PostCSS plugin to unwrap nested rules like how Sass does it.
  • postcss-for — PostCSS plugin that enables @for loop syntax in your CSS.
  • postcss-css-variables — PostCSS plugin to transform CSS Custom Properties (CSS variables) syntax into a static representation.
  • postcss-custom-media — PostCSS plugin to transform W3C CSS Custom Media Queries syntax to more compatible CSS.
  • postcss-inline-svg — PostCSS plugin to reference an SVG file and control its attributes with CSS syntax.
  • postcss-assets — PostCSS Assets is an asset manager for CSS.
  • [postcss-brand-colors](https://gi
var sp = [].slice.apply(document.querySelectorAll('link[rel=preload][as=style]'))
sp.forEach(function(item) {
item.onload = function() {
item.rel = 'stylesheet'
item.onload = null
}
})
/**
@Akurganow
Akurganow / svg-icon.coffee
Created December 1, 2015 10:53
PostCSS SVG Icons
path = require 'path'
fs = require 'fs'
fixedEncodeURIComponent = (str) ->
encodeURIComponent(str).replace(/[!'()*]/g, (c) ->
'%' + c.charCodeAt(0).toString(16)
)
injectColor = (svg, color) ->
svg.replace(/<svg[^>]*>/, "$&<style>*{fill:#{ color }}</style>")

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2

Results