Skip to content

Instantly share code, notes, and snippets.

@GunGunGun
GunGunGun / Zinstall.sh
Last active October 28, 2024 12:48
Zinstall.sh
#!/bin/bash
app_name=zen
literal_name_of_installation_directory=".tarball-installations"
universal_path_for_installation_directory="$HOME/$literal_name_of_installation_directory"
app_installation_directory="$universal_path_for_installation_directory/zen"
official_package_location="https://github.com/zen-browser/desktop/releases/latest/download/zen.linux-specific.tar.bz2"
tar_location=$(mktemp /tmp/zen.XXXXXX.tar.bz2)
open_tar_application_data_location="zen"
local_bin_path="$HOME/.local/bin"
@GunGunGun
GunGunGun / Cargo.toml
Created July 1, 2024 04:18 — forked from ftk/Cargo.toml
http mitm proxy. Simple http proxy to modify Range: http headers. Can be used to speed up youtube in mpv
# To generate mitm cert and key:
# openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -passout pass:"third-wheel" -subj "/C=US/ST=private/L=province/O=city/CN=hostname.example.com"
# see: https://github.com/campbellC/third-wheel
[package]
name = "http-ytproxy"
version = "0.1.0"
edition = "2021"
@GunGunGun
GunGunGun / submit.md
Created May 5, 2024 07:26 — forked from tanaikech/submit.md
Uploading Local Files to Google Drive without Authorization using HTML Form

Uploading Local Files to Google Drive without Authorization using HTML Form

This is a sample script for uploading local file to Google Drive without the authorization using HTML form. A selected file in your local PC using HTML form is uploaded to Google Drive and saved to Google Drive.

When you use this, at first, please deploy Web Apps. The script is doPost() of following scripts.

Script : Google Apps Script

function doPost(e) {
 var data = Utilities.base64Decode(e.parameters.data);
@GunGunGun
GunGunGun / svg-to-png.js
Created April 27, 2024 16:32 — forked from camman3d/svg-to-png.js
Convert SVG to PNG. Verified in Chrome, Safari, and Firefox
// let svg = document.querySelector('svg');
function svgToPng(svg) {
let svgData = new XMLSerializer().serializeToString(svg);
let canvas = document.createElement('canvas');
let ctx = canvas.getContext('2d');
let DOMURL = window.URL || window.webkitURL || window;
let img = new Image();
let blog = new Blob([svgData], {type: 'image/svg+xml'});
let url = DOMURL.createObjectURL(blog);
@GunGunGun
GunGunGun / record.py
Created April 7, 2024 14:35 — forked from korakot/record.py
Record audio in Colab using getUserMedia({ audio: true })
# all imports
from IPython.display import Javascript
from google.colab import output
from base64 import b64decode
from io import BytesIO
!pip -q install pydub
from pydub import AudioSegment
RECORD = """
const sleep = time => new Promise(resolve => setTimeout(resolve, time))
@GunGunGun
GunGunGun / Index.html
Created April 7, 2024 14:02 — forked from meziantou/Index.html
Javascript - Record audio
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<h1>Audio</h1>
@GunGunGun
GunGunGun / m3u8-to-youtube-live.md
Created March 22, 2024 00:44 — forked from qntmpkts/m3u8-to-youtube-live.md
Restream m3u8 stream with ffmpeg to youtube live

Setup YouTube Live Event

Head on over to your YouTube live Events page (https://www.youtube.com/my_live_events).

Create a new live event that is unlisted (or private) and of Custom type.

Under Basic ingestion choose 1500 Kbps - 4000 kbps (720p).

Check the Enable 60fps box.

😀 grinning face
😃 grinning face with big eyes
😄 grinning face with smiling eyes
😁 beaming face with smiling eyes
😆 grinning squinting face
😅 grinning face with sweat
🤣 rolling on the floor laughing
😂 face with tears of joy
🙂 slightly smiling face
🙃 upside-down face
@GunGunGun
GunGunGun / postgres_command.md
Created March 20, 2024 03:47 — forked from oNguyenNgocTrung/postgres_command.md
Tổng hợp những câu lệnh khi dùng Postgres SQL