Skip to content

Instantly share code, notes, and snippets.

View o0101's full-sized avatar
🏖️
Netscaping

Cris o0101

🏖️
Netscaping
View GitHub Profile
to check if the server works - https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice
stun:
stun.l.google.com:19302,
stun1.l.google.com:19302,
stun2.l.google.com:19302,
stun3.l.google.com:19302,
stun4.l.google.com:19302,
stun.ekiga.net,
stun.ideasip.com,
@o0101
o0101 / win98.html
Created January 24, 2023 16:19 — forked from camthesaxman/win98.html
Windows 98 Simulator
<html>
<head>
<title>Windows 98</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://unpkg.com/98.css">
<style>
/* Disable image filtering */
img {
image-rendering: optimizeSpeed; /* STOP SMOOTHING, GIVE ME SPEED */
@o0101
o0101 / web_htop.sh
Created January 3, 2023 04:23 — forked from stefanocudini/web_htop.sh
web colored interface for htop
#!/bin/bash
# requirements: apt install nmap htop aha
# (aha is ANSI color to HTML converter)
ncat -k -l -p 9999 -c "echo 'HTTP/1.1 200 OK\nContent-type: text/html\nconnection: close\\n'; echo q | htop | aha --black --line-fix"
@o0101
o0101 / LICENSE.md
Created December 30, 2022 10:01 — forked from sj26/LICENSE.md
Bash retry function

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit

@o0101
o0101 / chrome_bookmark_checksum.py
Created January 2, 2022 16:21 — forked from simon816/chrome_bookmark_checksum.py
Calculate Chrome bookmarks checksum
from hashlib import md5
# See https://chromium.googlesource.com/chromium/src/+/master/components/bookmarks/browser/bookmark_codec.cc
def regen_checksum(roots):
digest = md5()
def digest_url(url):
digest.update(url['id'].encode('ascii'))
digest.update(url['name'].encode('UTF-16-LE'))
@o0101
o0101 / export-sync-bookmarks.js
Created December 29, 2021 15:13 — forked from ilokhov/export-sync-bookmarks.js
Node.js script for exporting and synchronising bookmarks from Google Chrome
const fs = require("fs");
const path = require("path");
function newItem(name, url) {
return { name, url };
}
const bookmarkPath = path.join(
process.env.HOME,
"/Library/Application Support/Google/Chrome/Default/Bookmarks"
@o0101
o0101 / sysctl.conf
Created August 14, 2021 06:39 — forked from kgriffs/sysctl.conf
Linux Web Server Kernel Tuning
# Configuration file for runtime kernel parameters.
# See sysctl.conf(5) for more information.
# See also http://www.nateware.com/linux-network-tuning-for-2013.html for
# an explanation about some of these parameters, and instructions for
# a few other tweaks outside this file.
#
# See also: https://gist.github.com/kgriffs/4027835
#
# Assumes a beefy machine with lots of network bandwidth
@o0101
o0101 / script-template.sh
Created December 15, 2020 12:07 — forked from m-radzikowski/script-template.sh
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1
trap cleanup SIGINT SIGTERM ERR EXIT
usage() {
cat <<EOF
@o0101
o0101 / gist:b52c5a1808548b991c22857e358db61c
Created October 31, 2020 15:09 — forked from kurokikaze/gist:350fe1713591641b3b42
install chrome from powershell
(new-object System.Net.WebClient).DownloadFile('http://dl.google.com/chrome/install/375.126/chrome_installer.exe', 'c:/temp/chrome.exe');. c:/temp/chrome.exe /silent /install;rm c:/temp -rec
@o0101
o0101 / background.js
Created November 22, 2019 11:43 — forked from muralikg/background.js
puppeteer screen capture demo. Currently records 10 second video. Change the timeout in background.js with your own logic to stop the recording when necessary. Try with `node export.js`
/* global chrome, MediaRecorder, FileReader */
chrome.runtime.onConnect.addListener(port => {
let recorder = null
port.onMessage.addListener(msg => {
console.log(msg);
switch (msg.type) {
case 'REC_STOP':
console.log('Stopping recording')
if (!port.recorderPlaying || !recorder) {