Skip to content

Instantly share code, notes, and snippets.

@dmytro-y-dev
dmytro-y-dev / platformio-ide-terminal-init.md
Last active January 9, 2017 00:04
Automatic initialization of terminals on start in `Atom` with `platformio-ide-terminal` plugin.
# Automatic initialization of terminals on start in `Atom` with `platformio-ide-terminal` plugin.
# Script was tested with `Atom` 1.12.9 and `platformio-ide-terminal` 2.2.2.
#
# Author: metamaker <https://github.com/metamaker>
#
# How to install:
# 1. Add this script to Atom's `init.coffee`.
# 2. Write your actual terminals configuration to `terminals` variable.
@dmytro-y-dev
dmytro-y-dev / SingleFileUpload.js
Created August 6, 2017 12:41
Simple React file input for admin-on-rest that supports uploading of exactly one file and automatically encodes uploads to base64
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Dropzone from 'react-dropzone';
import {translate} from 'admin-on-rest';
import FileInputPreview from "admin-on-rest/lib/mui/input/FileInputPreview";
const defaultStyle = {
dropZone: {
background: '#efefef',
@dmytro-y-dev
dmytro-y-dev / jquery-delete-event.js
Last active August 23, 2017 16:24
Example of how to accurately detach your event from jQuery handlers.
const table; /* DOM Element that reacts to resize event */
// Initialize table
const __sync = () { /* some happy crappy code */ };
$(window).on('resize', null, {
type: 'sticky-table-handler',
table: table
}, __sync);
__sync();
@dmytro-y-dev
dmytro-y-dev / 2019-https-localhost.md
Created March 6, 2020 16:59 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).