Skip to content

Instantly share code, notes, and snippets.

@astamicu
astamicu / Remove videos from Youtube Watch Later playlist.md
Last active May 6, 2024 15:20
Script to remove all videos from Youtube Watch Later playlist

UPDATED 22.11.2022

It's been two years since the last update, so here's the updated working script as per the comments below.

Thanks to BryanHaley for this.

setInterval(function () {
    video = document.getElementsByTagName('ytd-playlist-video-renderer')[0];

 video.querySelector('#primary button[aria-label="Action menu"]').click();
@Yukaii
Yukaii / README.md
Last active May 6, 2024 15:20
g0v logbot simple navigation

g0v logout simple navigation

Add the bottom right buttons for more sensible navigation.

スクリーンショット 2024-05-06 夜中11 17 17

Installation

Install Greasemonkey

@unoexperto
unoexperto / patch_apk_for_sniffing.md
Last active May 6, 2024 15:19
How to patch Android app to sniff its HTTPS traffic with self-signed certificate

How to patch Android app to sniff its HTTPS traffic with self-signed certificate

  • Download apktool from https://ibotpeaches.github.io/Apktool/
  • Unpack apk file: java -jar /home/expert/work/tools/apktool.jar d net.flixster.android-9.1.3@APK4Fun.com.apk
  • Modify AndroidManifest.xml by adding android:networkSecurityConfig="@xml/network_security_config" attribute to application element.
  • Create file /res/xml/network_security_config.xml with following content:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <base-config>
@wojteklu
wojteklu / clean_code.md
Last active May 6, 2024 15:19
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@williamn
williamn / gist:2894205
Created June 8, 2012 07:24 — forked from JonathanTron/gist:361875
Steps to mirror a Git repository
# go to your repository
cd my_project
# check your existing remote
git remote -v
# origin git@mydomain.tld:my_project.git (fetch)
# origin git@mydomain.tld:my_project.git (push)
# Add a new remote, a github.com private repository for example
# the --mirror flag is what's different from a simple new remote
@nkhitrov
nkhitrov / logger.py
Last active May 6, 2024 15:18
Configure uvicorn logs with loguru for FastAPI
"""
WARNING: dont use loguru, use structlog
https://gist.github.com/nkhitrov/38adbb314f0d35371eba4ffb8f27078f
Configure handlers and formats for application loggers.
"""
import logging
import sys
from pprint import pformat
@Juul
Juul / lte_mbim_from_scratch.md
Last active May 6, 2024 15:17
How to use 4G LTE modems like the MC7455 on both Debian/Ubuntu and OpenWRT using MBIM

The purpose of this document is to get you familiar with the concepts and command line tools involved with connecting to the internet using modern 4G LTE modems on both Debian/Ubuntu and OpenWRT.

This writeup is based on my experiences with the Sierra Wireless AirPrime MC7455 modem and a Calyx (Sprint) SIM card, but it should apply to most modern 4G LTE modems.

High level overview

These are the steps required:

  • Physically connect antennas
@sergiobd
sergiobd / Dockerfile
Created September 4, 2023 07:46
Dockerfile for 3D Gaussian splatting
## Unofficial Dockerfile for 3D Gaussian Splatting for Real-Time Radiance Field Rendering
## Bernhard Kerbl, Georgios Kopanas, Thomas Leimkühler, George Drettakis
## https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/
# Use the base image with PyTorch and CUDA support
FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-devel
# NOTE:
# Building the libraries for this repository requires cuda *DURING BUILD PHASE*, therefore:
@WeirdConstructor
WeirdConstructor / RustAudioLinkCollection.md
Last active May 6, 2024 15:13
Rust Audio Link Collection

Weird Constructor's (slightly opinionated) Rust Audio Link Collection

@leohoy
leohoy / ALKIS.py
Last active May 6, 2024 15:08
A python based NAS XML converter to any geo format with the help of gdal and geopandas
from osgeo import ogr
import os
import geopandas as gp
from sys import getsizeof
dictwhichfileiswhichclass={}
for filename in os.listdir('ALKIS'):
if filename.endswith(".xml"):
file1 = open('ALKIS/{}'.format(filename), "r+")
data = file1.read()