Skip to content

Instantly share code, notes, and snippets.

View mishazawa's full-sized avatar
🎩
because white is boring

mishazawa

🎩
because white is boring
View GitHub Profile
@mishazawa
mishazawa / monokai.md
Created June 29, 2024 07:55 — forked from brayevalerien/monokai.md
Monokai theme color codes

Monokai theme color codes

Intro

This document lists the colors used in the Monokai Pro theme with the Classic filter. Please check the Monokai Pro website for more informations.

Colors

Monokai Pro with Classic filter colors:

Preview Hexadecimal RGB
Activity Bar Background activity bar background preview #272822 (39, 40, 34)
Activity Bar Foreground activity bar foreground preview #f8f8f2 (248, 248, 242)
@mishazawa
mishazawa / monokai.md
Created March 7, 2024 10:03 — forked from r-malon/monokai.md
Monokai colors in RGB and HEX format, taken from Sublime Text 3

Monokai Colors in RGB and HEX format


  • Background: (46, 46, 46); #2e2e2e
  • Comments: (121, 121, 121); #797979
  • White: (214, 214, 214); #d6d6d6
  • Yellow: (229, 181, 103); #e5b567
  • Green: (180, 210, 115); #b4d273
  • Orange: (232, 125, 62); #e87d3e
  • Purple: (158, 134, 200); #9e86c8
@mishazawa
mishazawa / wat.js
Created June 8, 2023 17:40 — forked from AVGP/wat.js
ffmpeg.js converting webm from a media recorder into mp4
var ffmpeg = require('ffmpeg.js/ffmpeg-mp4.js')
document.querySelector('button').addEventListener('click', (evt) => {
document.querySelector('[camera]').setAttribute('animation', {
property: 'rotation',
to: '0 360 0',
dur: 10000,
easing: 'linear'
})
@mishazawa
mishazawa / installJdkTarGzUbuntu.sh
Created August 26, 2020 16:57 — forked from filipelenfers/installJdkTarGzUbuntu.sh
Install JDK from tar.gz Ubuntu
#Login as root
sudo su
#create jdk directory
mkdir /opt/jdk
#uncompress, change to your file name
tar -zxf jdk-8u5-linux-x64.tar.gz -C /opt/jdk
#check if files are there
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
- created cats/ and dogs/ subfolders inside train/ and validation/
- put the cat pictures index 0-999 in data/train/cats
@mishazawa
mishazawa / long-polling.html
Created September 21, 2018 07:08 — forked from kixxauth/long-polling.html
A Node.js http long polling server for HTTP streaming.
<!DOCTYPE html>
<html>
<style type="text/css">
body {
font-size: 18px;
background: #000;
color: #fff;
}
#container {
width: 600px;
@mishazawa
mishazawa / redux-fetch-interceptors.js
Created March 26, 2018 12:35 — forked from jaysoo/redux-fetch-interceptors.js
Redux + fetch interceptors
/*
* WARNING: Mutates the fetchContext argument (by default the window or global context).
*
* A crude way to intercept fetch responses, and dispatch actions as needed. Using this
* for more global app concerns, where I may want to dispatch actions depending on the response
* status or body. e.g. When seeing a 401, dispatch a logout action.
*
* In most cases, I'd recommend using a middlware as shown in redux's real-world example.
* (https://github.com/reactjs/redux/blob/master/examples/real-world/middleware/api.js)
*
@mishazawa
mishazawa / VPS: iptables+node+pm2.md
Created February 24, 2017 15:26 — forked from pilotak/VPS: iptables+node+pm2.md
Basic VPS setting + node.js + pm2

If you have an access as a root to your Ubuntu 16.04 VPS you should setup another user giving him sudo access

Create user

adduser pavel # my user is called "pavel"; enter password and leave all the rest
usermod -aG sudo pavel
nano /etc/ssh/sshd_config # disable root access
# find 
    PermitRootLogin # change value to: no
# add
    AllowUsers pavel