Skip to content

Instantly share code, notes, and snippets.

@rbreaves
rbreaves / Firefox-global-menu-fix.sh
Last active May 2, 2024 06:35
Firefox AUR global menu fix for any distro
#!/bin/bash
curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/install | sudo sh
sudo apt install podman
distrobox-create --name arch --image docker.io/library/archlinux:latest
distrobox-enter arch
# Pre-compiled
@ohownew
ohownew / 知识星球视频增强.js
Last active May 2, 2024 06:35
知识星球原生视频组件,无法通过键盘操作前进、后退、暂停、播放,于是写了一个简单的脚本,要先安装好篡改猴Tampermonkey等插件管理器。然后新建脚本,并复制如下代码
// ==UserScript==
// @name 知识星球视频增强
// @namespace http://tampermonkey.net/
// @version 2024-04-21
// @description 知识星球视频,通过键盘控制: 前进 后退 暂停 开始 全屏
// @author ohownew
// @match https://wx.zsxq.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=zsxq.com
// @grant none
// ==/UserScript==
@BrutalSimplicity
BrutalSimplicity / Dockerfile
Created September 1, 2022 20:20
Dockerfile with asdf + docker install bits
FROM debian:latest
# Install basic dev packages
RUN apt-get clean && apt-get update && apt-get -y install --no-install-recommends \
apt-utils \
openssh-client \
git \
gnupg2 \
dirmngr \
iproute2 \
@LuemmelSec
LuemmelSec / GBC.ps1
Created December 9, 2022 07:43
Give Back Control over Windows functions script
$elevated = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
function Show-Menu {
Clear-Host
Write-Host "======================================================"
Write-Host "================ Give Back Control ================"
Write-Host "======================================================"
if($elevated -eq $true){
Write-Host "Local Admin: " -ForegroundColor white -NoNewline; Write-Host $elevated -ForegroundColor Green
Write-Host "We have superpowers. Ready to continue."
@denji
denji / http-benchmark.md
Last active May 2, 2024 06:26
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)
@jboner
jboner / latency.txt
Last active May 2, 2024 06:23
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@klkucan
klkucan / FBXMeshExtractor.cs
Last active May 2, 2024 06:23
Extracting Meshes from FBX Files
using UnityEngine;
using UnityEditor;
public class FBXMeshExtractor
{
private static string _progressTitle = "Extracting Meshes";
private static string _sourceExtension = ".FBX";
private static string _targetExtension = ".asset";
@jonnor
jonnor / mlflow_keras_tuner.py
Created November 14, 2021 17:59
MLFlow integration for Keras-Tuner
"""mlflow integration for KerasTuner
Copyright: Soundsensing AS, 2021
License: MIT
"""
import uuid
import structlog
@hqnicolas
hqnicolas / How to kohya_ss on AMD 7800xt
Last active May 2, 2024 06:15
7800xt ZLUDA Training LORA of the latest version of kohya_ss on AMD GPU Ubuntu 22.04.2 LTS CUDA
# Clean install Ubuntu 22.04.2 LTS
# tested on rx7800XT
# Install Drivers on Drivers section from this Gist
################ START ################
# Download and extract Zluda and drop it on /opt/rocm-6.0.2/lib
# https://github.com/vosen/ZLUDA/releases/
# go to /opt/rocm/lib
# Create a Copy librocblas.so.4 and rename it to librocblas.so.3