Skip to content

Instantly share code, notes, and snippets.

View Chi-teck's full-sized avatar

Ivan Chi-teck

  • Russia
View GitHub Profile
@rbrahul
rbrahul / chrome_storage_polyfill.js
Last active August 22, 2022 06:40
This Polyfill provides basic support for chrome.storage.sync and chrome.storage.local API outside of chrome extension runtime
const chromeStoragePolyfill = function (dbName) {
const STORAGE_PREFIX = "CHROME_STORAGE_API_WRAPPER_DB";
let __db__;
const _getData = () => {
const jsonData = window.localStorage.getItem(__db__);
if (jsonData) {
return JSON.parse(jsonData);
}
};
@JBlond
JBlond / bash-colors.md
Last active September 23, 2024 15:07 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active September 17, 2024 08:31
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@alobato
alobato / start-stop-example.sh
Created March 3, 2012 23:09
start-stop-example
#!/bin/sh
# Quick start-stop-daemon example, derived from Debian /etc/init.d/ssh
set -e
# Must be a valid filename
NAME=foo
PIDFILE=/var/run/$NAME.pid
#This is the command to be run, give the full pathname
DAEMON=/usr/local/bin/bar