Skip to content

Instantly share code, notes, and snippets.

View light9's full-sized avatar

Alexey Horoshavin light9

  • New Delhi, India
View GitHub Profile
@light9
light9 / framework-sizes.md
Created November 24, 2017 11:18 — forked from Restuta/framework-sizes.md
Sizes of JS frameworks, just minified + minified and gzipped, (React, Angular 2, Vue, Ember)

Below is the list of modern JS frameworks and almost frameworks – Angular, Ember and React.

All files were downloaded from https://cdnjs.com and named accordingly. Output from ls command is stripped out (irrelevant stuff)

As-is (minified)

$ ls -lhS
566K Jan 4 22:03 angular2.min.js
@light9
light9 / probably_random.ino
Created October 23, 2020 04:00 — forked from endolith/LICENSE.txt
Arduino hardware true random number generator
#include <stdint.h>
#include <avr/interrupt.h>
#include <avr/wdt.h>
byte sample = 0;
boolean sample_waiting = false;
byte current_bit = 0;
byte result = 0;
void setup() {
@light9
light9 / Arduino_ESP32_MOTOR_PWM.ino
Created January 7, 2021 18:01 — forked from tenergyinnovation/Arduino_ESP32_MOTOR_PWM.ino
ESP32 control speed DC motor by PWM signal
/***********************************************************************
* Project : Arduino_ESP32_MOTOR_PWM
* Description : ควบคุมความเร็วของมอเตอร์โดยกับปรับ VR1 และ VR2
* เพื่อควบคุมความกว้างของ Pulse Width Mod(PWM)
* Author : Tenergy Innovation Co., Ltd.
* Date : 14 Nov 2018
* Revision : 1.1
* Rev1.0 : Original
* Rev1.1 : Edit define pin and some variable
* website : http://www.tenergyinnovation.co.th
void main() async {
WidgetsFlutterBinding.ensureInitialized();
final container = ProviderContainer();
final routerDelegate = createDelegate(container.read);
final routeInformationParser = BeamerParser();
F.appFlavor = Flavor.DEV;
await Firebase.initializeApp();
@light9
light9 / mongodb_pass_reset.md
Created August 1, 2022 09:47 — forked from shivampip/mongodb_pass_reset.md
MongoDB shell admin password reset
  • open mongod.conf
cd /etc/mongod.conf
  • Comment security
#security:
#  authroization: "enabled"
@light9
light9 / Dockerfile
Created July 3, 2023 20:21 — forked from ernestboey/Dockerfile
Create Docker image with Alpine 3.9 + Golang 1.12.9 + Node.js 10.16.3
FROM node:10.16.3-alpine
# Golang From: https://github.com/docker-library/golang/blob/master/1.12/alpine3.10/Dockerfile
RUN apk add --no-cache \
ca-certificates
# set up nsswitch.conf for Go's "netgo" implementation
# - https://github.com/golang/go/blob/go1.9.1/src/net/conf.go#L194-L275
# - docker run --rm debian:stretch grep '^hosts:' /etc/nsswitch.conf
RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf
@light9
light9 / automountUbuntu
Created July 15, 2023 10:53 — forked from CreatorB/automountUbuntu
How to Set Ubuntu Automatically Mount Partition at Startup with fstab
List out the partitions
Use the fdisk command to list of all partitions
$ sudo fdisk -l
Here is what the ouput would look like
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes