Skip to content

Instantly share code, notes, and snippets.

View TanvirOnGH's full-sized avatar

𝒕𝒂𝒏𝒗𝒊𝒓 TanvirOnGH

View GitHub Profile
@stenuto
stenuto / hls.sh
Created November 7, 2024 16:58
HLS ffmpeg script
#!/bin/bash
# Function to display usage information
usage() {
echo "Usage: $0 /path/to/input.mp4 [ /path/to/output_directory ]"
exit 1
}
# Check if at least one argument (input file) is provided
if [ $# -lt 1 ]; then
@JeodC
JeodC / pm-primer-gms.md
Last active October 28, 2024 11:36
PortMaster: Understanding Game Maker Engine - A Primer

image PortMaster: Understanding Game Maker Ports - A Primer image

image

A large chunk of PortMaster ports are games using the GameMaker Engine. This engine (referred to as GMS) is an excellent beginner engine for getting into porting, but can also quickly become pretty advanced. This primer hopes to accurately summarize a few key points for how GMS ports are created and work.

Tools Used

PortMaster Engineers heavily rely on a few major tools that make GMS ports successful.

@sayakpaul
sayakpaul / inference_with_torchao_serialized.py
Last active November 18, 2024 00:59
Shows how to run Flux schnell under 17GBs without bells and whistles. It additionally shows how to serialize the quantized checkpoint and load it back.
import torch
from huggingface_hub import hf_hub_download
from diffusers import FluxTransformer2DModel, DiffusionPipeline
dtype, device = torch.bfloat16, "cuda"
ckpt_id = "black-forest-labs/FLUX.1-schnell"
with torch.device("meta"):
config = FluxTransformer2DModel.load_config(ckpt_id, subfolder="transformer")
model = FluxTransformer2DModel.from_config(config).to(dtype)
(defun epicemacs/save-and-kill-tramp-buffers ()
(interactive)
(let* (
(filter "\*") ;; not any meta buffers such as #<buffer *tramp/ssh rootepicvps*> - let them be
(ssh-buffers (seq-filter (lambda (buf)
(not (string-match-p filter (buffer-name buf))))
(tramp-list-remote-buffers)))
(ssh-buffer-names (mapcar #'buffer-name ssh-buffers))
(prettylist (mapconcat 'identity ssh-buffer-names " "))
)

Crippling Facebook

Facebook works with advertisers to target you. These instructions are one of the many ways to begin crippling that relationship. When AI targeting is crippled, your psychosecurity improves :)

  1. On your desktop machine, goto https://accountscenter.facebook.com/ads/audience_based_advertising
  2. Maximize the browser window
  3. Press F12 and click on the Console tab
  4. Select the code below, copy it, paste it upon the Console line (The area next to the > character in the Console window), and press enter:
@soulhotel
soulhotel / userChrome.css
Last active November 8, 2024 22:12
Method for stylizing the context menu (Firefox CSS)
/* ----------------------------------------------------------
Styling Firefoxs context (right-click) menu
- this will target all context menus, including the menubar, and drop downs.
- If you want this to only apply to the context menu activated within webpages you can specify it, such as: #contentAreaContextMenu
-----------------------------------------------------------*/
/*
Using your own defined variables makes switching styles/colors much easier to manage
*/
@bartowski1182
bartowski1182 / calibration_datav3.txt
Last active November 17, 2024 13:42
Calibration data provided by Dampf, combines his own efforts on top of Kalomaze's. Used for calibrating GGUF imatrix files
In addition to a significant decrease in hepatic lipid accumulation in the IOE group, which inhibited energy intake by propionate enrichment, hepatic lipids were also significantly reduced in the mice in the IOP group, which was largely enriched with butyrate. Compared with the IOE group, IOP had a stronger regulatory effect on hepatic metabolism and triglyceride metabolism and higher levels of TCA cycle in the host. In addition, butyrate has the ability to promote browning of white adipose tissue (WAT) to brown adipose tissue (BAT).^[@ref39],[@ref40]^ WAT stores energy, whereas BAT uses energy for heating and consequently host energy expenditure increases.^[@ref41],[@ref42]^ However, adipose tissue weight does not change after WAT browning.^[@ref43]^ Therefore, the weight of adipose tissue of mice in the IOP group dominated by butyrate was greater than that of the mice in the IOE group dominated by propionate.
In conclusion ([Figure [7](#fig7){ref-type="fig"}](#fig7){ref-type="fig"}C), the improvement of ob
@JohnRTitor
JohnRTitor / refind-nixos.md
Last active August 30, 2024 09:28
reFINd install on NixOS Secureboot

Refind is a beautiful and customisable boot manager. It can be installed easily on NixOS by a simple command.

Regular users

Run the following commands to get a shell with required components.

nix-shell -p refind efibootmgr sbsigntool

Now you can run refind-install to install the boot manager on to your EFI.

@ziozzang
ziozzang / README.txt
Created April 29, 2024 07:33
Delta Merge
Code from : https://github.com/StableFluffy/EasyLLMFeaturePorter/blob/main/1-Click.ipynb
- Just converted into CLI
Run Like this.
```
python convert.py [informative_model_path] [base_model_path] [target_model_path] [output_path]
```
Params:
@thesamesam
thesamesam / xz-backdoor.md
Last active November 17, 2024 13:13
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that