Skip to content

Instantly share code, notes, and snippets.

View frenzzy's full-sized avatar

Vladimir Kutepov frenzzy

View GitHub Profile
@frenzzy
frenzzy / base64.js
Created May 20, 2022 09:53
Any file to base64 url cli tool
var path = require('path');
var fs = require('fs');
var mime = 'application/octet-stream';
var encoding = 'base64';
var data = fs.readFileSync(path.resolve(process.argv[process.argv.length - 2])).toString(encoding);
var uri = 'data:' + mime + ';' + encoding + ',' + data;
fs.writeFileSync(path.resolve(process.argv[process.argv.length - 1]), uri)
@frenzzy
frenzzy / test.js
Created July 10, 2018 11:18
Perf test
const props = ['accept', 'acceptcharset', 'accept-charset', 'accesskey', 'action', 'allowfullscreen', 'alt', 'as', 'async', 'autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'autoplay', 'autosave', 'capture', 'cellpadding', 'cellspacing', 'challenge', 'charset', 'checked', 'children', 'cite', 'class', 'classid', 'classname', 'cols', 'colspan', 'content', 'contenteditable', 'contextmenu', 'controls', 'controlslist', 'coords', 'crossorigin', 'dangerouslysetinnerhtml', 'data', 'datetime', 'default', 'defaultchecked', 'defaultvalue', 'defer', 'dir', 'disabled', 'download', 'draggable', 'enctype', 'for', 'form', 'formmethod', 'formaction', 'formenctype', 'formnovalidate', 'formtarget', 'frameborder', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'htmlfor', 'httpequiv', 'http-equiv', 'icon', 'id', 'innerhtml', 'inputmode', 'integrity', 'is', 'itemid', 'itemprop', 'itemref', 'itemscope', 'itemtype', 'keyparams', 'keytype', 'kind', 'label', 'lang', 'list', 'loop', 'low', 'manifest', 'marginwi
@frenzzy
frenzzy / subtree.sh
Last active April 4, 2019 08:36
Update git subtree
#!/bin/bash
if [ "${CIRCLE_BRANCH}" != "master" ] || [ -z "${SUBTREE_REPOSITORY_URL}" ]
then
exit 0
fi
# abort the script if there is a non-zero error
set -e
@frenzzy
frenzzy / client.js
Last active October 24, 2016 06:25
React-Hot-Loader deepForceUpdate example
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import 'babel-polyfill';
@frenzzy
frenzzy / Home.js
Created September 7, 2016 12:35
RSK context.setMeta example
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React, { PropTypes } from 'react';
@frenzzy
frenzzy / src|routes|home|index.js
Last active April 8, 2021 11:13
Code Splitting Example
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
@frenzzy
frenzzy / client.js
Last active March 25, 2016 13:59
React Starter Kit Hot Router
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import 'babel-polyfill';
@frenzzy
frenzzy / package.json
Created December 18, 2015 15:45
build config
{
"private": true,
"name": "web-app-boilerplate",
"description": "Universal (isomorphic) Web App Boilerplate",
"license": "MIT",
"version": "0.0.0",
"engines": {
"node": ">=5.0.0"
},
"dependencies": {
@frenzzy
frenzzy / .csscomb.json
Last active August 29, 2015 14:13
CSScomb configuration options
{
"exclude": [
".git/**",
"node_modules/**"
],
"always-semicolon": true,
"block-indent": " ",
"colon-space": ["", " "],
"color-case": "lower",
"color-shorthand": true,