Skip to content

Instantly share code, notes, and snippets.

@ardaorkin
ardaorkin / delete-all-bookmarks.js
Last active December 28, 2024 13:44
Recursive script to delete all Chrome bookmarks via the browser's UI.
/**
* Script to recursively delete all bookmarks using the Chrome Bookmarks Manager UI.
* This script continues to run until no more bookmarks are available.
*
* Instructions:
* 1. Open Chrome Bookmarks Manager:
* - Go to `chrome://bookmarks` in your Chrome browser.
*
* 2. Open Developer Tools:
* - Right-click anywhere on the page and select "Inspect" OR
[
{
"Title": "Avatar",
"Year": "2009",
"Rated": "PG-13",
"Released": "18 Dec 2009",
"Runtime": "162 min",
"Genre": "Action, Adventure, Fantasy",
"Director": "James Cameron",
"Writer": "James Cameron",
@liuran001
liuran001 / config.yaml
Last active December 28, 2024 13:42
mihomo (Clash Meta) 懒人配置
# mihomo (Clash Meta) 懒人配置
# 版本 V1.15-241205
# https://gist.github.com/liuran001/5ca84f7def53c70b554d3f765ff86a33
# https://obdo.cc/meta
# 作者: 笨蛋ovo (bdovo.cc)
# Telegram: https://t.me/baka_not_baka
# 关注我的 Telegram 频道谢谢喵 https://t.me/s/BDovo_Channel
# 修改自官方示例规则 https://wiki.metacubex.one/example/#meta
# 转载请保留此注释
# 尽量添加了较为详尽的注释,不理解的地方建议对照 虚空终端 (Clash Meta) Docs 进行理解
@robinst
robinst / twitter-archive-following-followers.md
Last active December 28, 2024 13:39
Twitter: How to archive your following/followers data (usernames, etc)

Twitter allows users to download parts of their data, see How to download your Twitter archive.

But what's not included in that data dump is the usernames/handles of the people that you follow or are following you. All you get is account IDs which is just an internal number and so a bit useless when it comes to archival.

Here's a way to get that data (you need to know how to run stuff in the terminal):

  1. Go to your Twitter profile in a desktop browser (Firefox or Chrome)
  2. Right click on page → Inspect → Network tab
  3. Click on the Following link (e.g. https://twitter.com/{yourusername}/following)
@rehhouari
rehhouari / audiorelay-pipewire.md
Created March 15, 2024 01:16
How to install AudioRelay on Linux using Pipewire (through pipewire-pulse)
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active December 28, 2024 13:35 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export your tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

@raegedoc
raegedoc / 10-wancarp
Last active December 28, 2024 13:34 — forked from spali/10-wancarp
Disable WAN Interface on CARP Backup
#!/usr/local/bin/php
<?php
require_once("config.inc");
require_once("interfaces.inc");
require_once("util.inc");
$subsystem = !empty($argv[1]) ? $argv[1] : '';
$type = !empty($argv[2]) ? $argv[2] : '';
@bgolus
bgolus / WorldNormalFromDepthTexture.shader
Last active December 28, 2024 13:32
Different methods for getting World Normal from Depth Texture, without any external script dependencies.
Shader "WorldNormalFromDepthTexture"
{
Properties {
[KeywordEnum(3 Tap, 4 Tap, Improved, Accurate)] _ReconstructionMethod ("Normal Reconstruction Method", Float) = 0
}
SubShader
{
Tags { "RenderType"="Transparent" "Queue"="Transparent" }
LOD 100
@Vermouth811
Vermouth811 / monte_carlo_tree_search.py
Created December 28, 2024 13:29 — forked from qpwo/monte_carlo_tree_search.py
Monte Carlo tree search (MCTS) minimal implementation in Python 3, with a tic-tac-toe example gameplay
"""
A minimal implementation of Monte Carlo tree search (MCTS) in Python 3
Luke Harold Miles, July 2019, Public Domain Dedication
See also https://en.wikipedia.org/wiki/Monte_Carlo_tree_search
https://gist.github.com/qpwo/c538c6f73727e254fdc7fab81024f6e1
"""
from abc import ABC, abstractmethod
from collections import defaultdict
import math
@qpwo
qpwo / monte_carlo_tree_search.py
Last active December 28, 2024 13:29
Monte Carlo tree search (MCTS) minimal implementation in Python 3, with a tic-tac-toe example gameplay
"""
A minimal implementation of Monte Carlo tree search (MCTS) in Python 3
Luke Harold Miles, July 2019, Public Domain Dedication
See also https://en.wikipedia.org/wiki/Monte_Carlo_tree_search
https://gist.github.com/qpwo/c538c6f73727e254fdc7fab81024f6e1
"""
from abc import ABC, abstractmethod
from collections import defaultdict
import math