Skip to content

Instantly share code, notes, and snippets.

View chmelevskij's full-sized avatar
🥔
Potato is life

Tomas Chmelevskij chmelevskij

🥔
Potato is life
View GitHub Profile
@chmelevskij
chmelevskij / complete-reset.css
Last active November 5, 2020 07:25
Just a reset of stuff I constantly have to type in when doing web dev
*, *::after, *::before {
font-family: sans-serif;
box-sizing: border-box;
}
html, body {
padding: 0;
margin: 0;
}
enum Status {
Open = 'open',
InProgress = 'in-progress',
Complete = 'complete',
}
const InputSchema = new SimpleSchema({
status: {
type: String,
allowedValues: Object.values(Status),
// from https://stackoverflow.com/a/47916931/3618387
const destruct = (obj, ...keys) =>
keys.reduce((a, c) => { a[c] = obj[c]; return a; }, {});
@chmelevskij
chmelevskij / rollup.config.js
Created June 26, 2020 08:47
Basic config to build differential react build
import babel from '@rollup/plugin-babel';
import commonjs from '@rollup/plugin-commonjs';
import styles from 'rollup-plugin-styles';
import resolve from '@rollup/plugin-node-resolve';
import url from '@rollup/plugin-url';
import svgr from '@svgr/rollup';
import replace from '@rollup/plugin-replace';
import { terser } from 'rollup-plugin-terser';
import json from '@rollup/plugin-json'
@chmelevskij
chmelevskij / AmplifyBridge.ts
Last active June 6, 2019 15:19
AWS amplify bridge
/**
* Adapter to connect amplify hub and redux. Borrowed from:
* Thanks to https://github.com/richardzcode/Journal-AWS-Amplify-Tutorial/blob/master/step-08/journal/src/store/AmplifyBridge.js
*/
import { Auth, Hub, Logger } from 'aws-amplify';
import { Store } from 'redux';
const logger = new Logger('AmplifyBridge');
type AttributeArray = Array<{ Name: string; Value: any }>;

Keybase proof

I hereby claim:

  • I am chmelevskij on github.
  • I am tomche (https://keybase.io/tomche) on keybase.
  • I have a public key ASCWNfVvBXbsCCFMgQDQcyTG5EW3gYU3QTWt-9DkY3-IAAo

To claim this, I am signing this object:

@chmelevskij
chmelevskij / poor-mans-lodash.js
Created April 2, 2018 16:31
Poor Mans Lodash
/**
unwrap functional power from Arrays
*/
const keys = [
'concat',
'entries',
'every',
'filter',
'find',
'findIndex',
@chmelevskij
chmelevskij / differ.sh
Created September 19, 2017 11:20
Deep diff directories with ignore
# |---ignores--------------|
diff --brief -Nr -x *.gif -x *.jpg -x *.png www-yellowbulldog-co-uk-intrigger-cms-production/ yellow-bulldog/dist
@chmelevskij
chmelevskij / litttle-tools.js
Created April 25, 2017 12:42
Snippets from my chrome devtools.
let _ = {
range : n => [...Array(n).keys()]
}
@chmelevskij
chmelevskij / .inputrc
Last active September 30, 2016 20:01
set completion-ignore-case on
set visible-stats on
set editing-mode vi
$if mode=vi
set keymap vi-command
set keymap vi-insert
"\C-l": clear-screen
$endif