Skip to content

Instantly share code, notes, and snippets.

@glubsy
glubsy / howto_record_youtube_livestreams.md
Last active April 16, 2024 14:48
How to properly record Youtube & Twitch live streams

How to record Youtube live streams:

  • use livestream_saver to download from the first segment. Can also record membership-only streams by supplying it your cookies (uses yt-dlp to download)

  • use ytarchive which basically does the same thing, except a bit better.

  • use youtube_stream_capture. You can use cookies file to get member-only streams too. Be aware that this script currently fails to download chunks as soon as the stream has ended (this might be a bug).

  • or use live-dl which does monitoring of streams too. This is a wrapper around streamlink and yt-dlp.

@waveform80
waveform80 / README.md
Last active April 16, 2024 14:46
Script for editing / dumping / graphing a uboot environment

U-Boot Environment Tools

A simple Python script for editing U-Boot environments. Should automatically detect the size of the U-Boot environment, and whether the "redundand" (sic) byte is included in it.

The script can be renamed (or linked) to "dump-env" for a simple tool to dump U-Boot environments too, or to "dot-env" for a tool that'll attempt to generate a Graphviz dot graph by parsing the U-Boot environment from $bootcmd (please note this last function is quite experimental, although I've found it useful in the past for figuring out the dependencies and execution paths of certain scripts).

Summary

  • edit-env env - Edit U-Boot environment env in the system editor
@aliel
aliel / .env
Last active April 16, 2024 14:46
Aleph.im - Decentralize LLM's on Aleph network
ALEPH_RUNTIME=b684c1971534ca3fbd672d87f72f392a1695e197ecfc464eae202aa82de4e9d3
MODEL_URL=https://huggingface.co/mlabonne/NeuralBeagle14-7B-GGUF/resolve/main/neuralbeagle14-7b.Q2_K.gguf
LLM_ENGINE_REPO=https://github.com/ggerganov/llama.cpp.git
LLM_VERSION=master
LLM_RUNTIME_COMMAND="/opt/code/server --host 0.0.0.0 --port 8080 --host :: -c 4096 --mlock -cb --log-disable --slots-endpoint-disable -m"
@tanaikech
tanaikech / submit.md
Last active April 16, 2024 14:46
Modifying Revisions of a File on Google Drive using Google Apps Script

Modifying Revisions of a File on Google Drive using Google Apps Script

This is a sample script for modifying the revisions of a file on Google Drive using Google Apps Script. This script can be used for not only Google Docs files, but also the files except for Google Docs.

Issue and workaround:

Unfortunately, in the current stage, at Google Docs files, the revision of Google Docs cannot be directly changed by APIs with a script. So as one of several workarounds, I would like to propose to overwrite the Google Docs file using the exported data. On the other hand, at the files except for Google Docs, the data can be directly retrieved with the revision ID. This can be used for overwriting the file. The flow of this script is as follows.

For Google Docs files:

@fredrikasberg
fredrikasberg / btt canbus setup.md
Last active April 16, 2024 14:45
BTT Manta M8P v1.1 + BTT EBB 2209 Canbus setup
@mrk-han
mrk-han / emulator-install-using-avdmanager.md
Last active April 16, 2024 14:43
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architecture (for an M1/M2 Macbook):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-30;google_atd;arm64-v8a"

@zmts
zmts / A Nuxt.js VPS production deployment.md
Created December 6, 2018 15:19 — forked from DreaMinder/A Nuxt.js VPS production deployment.md
Deployment manual for a real-world project built with nuxt.js + koa + nginx + pm2

Example of deployment process which I use in my Nuxt.js projects. I usually have 3 components running per project: admin-panel SPA, nuxt.js renderer and JSON API.

This manual is relevant for VPS such as DigitalOcean.com or Vultr.com. It's easier to use things like Now for deployment but for most cases VPS gives more flexebillity needed for projects bigger then a landing page.

UPD: This manual now compatible with nuxt@2.3. For older versions deployment, see revision history.


Let's assume that you have entered fresh installation of Ubuntu instance via SSH. Let's rock:

@dunderrrrrr
dunderrrrrr / GeoIP Block NGINX Ubuntu 20.04.md
Created April 19, 2021 08:28
Allow or block GeoIP in Nginx on Ubuntu 20.04

GeoIP Block NGINX Ubuntu 20.04

Block or filter IPs based on location in Nginx (tested on 1.18.0) on Ubuntu 20.04.

Install Nginx modules

To make use of the geographical filtering, we must first install the Nginx GeoIP module as well as the GeoIP database containing the mappings between visitors’ IP addresses and their respective countries. To do so, let’s execute:

$ sudo apt install libnginx-mod-http-geoip geoip-database
@philipecampos
philipecampos / node.md
Created February 19, 2023 15:18
Imagem genérica nodejs para desenvolvimento de projetos

Contextualizando

Era meu desejo usar node sem precisar instalar diversas versões na minha máquina, então usando docker eu poderia ter a versão que quisesse naquele projeto e logo em seguida poderia descartar essa instalação sem ficar ocupando espaço em disco ou memória ram com um servidor node.

Considerações

  • Todos os comandos abaixo precisam do docker instalado previamente
  • Os comandos levam em consideração que o diretório de todos os projetos é /home/seu_usuario/www
@tejainece
tejainece / configure_modelsim.sh
Last active April 16, 2024 14:40
This script installs all the 32 bit library dependencies of modelsim and also compiles freetype.
#!/bin/bash
ALTERA_PATH=~/altera/13.1/
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install gcc-multilib g++-multilib \
lib32z1 lib32stdc++6 lib32gcc1 \
expat:i386 fontconfig:i386 libfreetype6:i386 libexpat1:i386 libc6:i386 libgtk-3-0:i386 \
libcanberra0:i386 libpng12-0:i386 libice6:i386 libsm6:i386 libncurses5:i386 zlib1g:i386 \