Skip to content

Instantly share code, notes, and snippets.

@pascalpoitras
pascalpoitras / config.md
Last active April 28, 2024 23:12
My WeeChat configuration

WeeChat Screenshot

Mouse


enable


@mbostock
mbostock / .block
Last active April 28, 2024 23:11
Force-Directed Graph
license: gpl-3.0
height: 600
redirect: https://observablehq.com/@d3/d3-force-directed-graph
import UIKit
final class TransitionDelegate: NSObject,
UIViewControllerTransitioningDelegate {
private let interactiveController = UIPercentDrivenInteractiveTransition()
private let duration = CATransaction.animationDuration()
func presentationController(forPresented presented: UIViewController,
@xiaoxiaoleo
xiaoxiaoleo / GoogleHackMasterList.txt
Last active April 28, 2024 23:08 — forked from cmartinbaughman/GoogleHackMasterList.txt
The definitive super list for "Google Hacking".
admin account info" filetype:log
!Host=*.* intext:enc_UserPassword=* ext:pcf
"# -FrontPage-" ext:pwd inurl:(service | authors | administrators | users) "# -FrontPage-" inurl:service.pwd
"AutoCreate=TRUE password=*"
"http://*:*@www” domainname
"index of/" "ws_ftp.ini" "parent directory"
"liveice configuration file" ext:cfg -site:sourceforge.net
"parent directory" +proftpdpasswd
Duclassified" -site:duware.com "DUware All Rights reserved"
duclassmate" -site:duware.com
@savarin
savarin / bplustree.py
Last active April 28, 2024 23:04
Python implementation of a B+ tree
"""Simple implementation of a B+ tree, a self-balancing tree data structure that (1) maintains sort
data order and (2) allows insertions and access in logarithmic time.
"""
class Node(object):
"""Base node object.
Each node stores keys and values. Keys are not unique to each value, and as such values are
stored as a list under each key.
@denilsonsa
denilsonsa / README.md
Last active April 28, 2024 23:01
Bundle Helper
@f0ster
f0ster / accelerate_presharder.py
Created April 28, 2024 14:08
CLI for sharding and publishing models to huggingface
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
from accelerate import Accelerator
import os
import argparse
def main():
# Parse command line arguments
args = parse_args()
@flavienbonvin
flavienbonvin / dynamic_imports.tsx
Created March 29, 2022 18:28
NextJS optimisation gist
const ServiceBadge = dynamic(() => import(‘../Molecules/ServiceBadge’))
const ServiceHeader = ({service, title}: Props) => {
const router = useRouter()
const isMobile = useBreakpointValue([true, null, false], ‘base’)
return (
<HStack>
<BackButton onClick={() => router.replace(ROUTE_ROOT)} />
{isMobile && <ServiceBadge {…service} />}
@luizomf
luizomf / upscale_1080p_to_4k_using_ffmpeg.md
Last active April 28, 2024 22:58
Upscale 1080p to 4k using ffmpeg

Upscale 1080p to 4k using ffmpeg

Just use the command below:

ffmpeg -i INPUT_FILE \
  -vf scale=3840x2160:flags=lanczos \
  -c:v libx264 \
  -crf 13 \
 -c:a aac -b:a 512k \
@bramtechs
bramtechs / upgrade-debian-wsl.md
Last active April 28, 2024 22:55
Upgrade Debian 9, (current WSL) to Debian 12 (bookworm testing)

Upgrade Debian 9 (current WSL) to Debian 12 (bookworm testing)

Note: I do not maintain this gist anymore, but people report that it still works. Please check the comments for any revisions or extra things you should take into consideration.

As of writing, the Debian distro for WSL (Windows Subsystem for Linux) is quite old.

You can get more up-to-date package managers, text-editors and compilers by upgrading WSL to Debian 12 (current testing).

  • Root required
  • Use at your own risk, preferably on a fresh installation.