Skip to content

Instantly share code, notes, and snippets.

@lyh16
lyh16 / userscript.js
Last active June 8, 2024 03:53 — forked from cjanietz/userscript.js
Perplexity Model Selection User Script
// ==UserScript==
// @name Perplexity Model Selection
// @version 0.2
// @description Adds custom buttons to Perplexity AI using jQuery
// @author dpgc, lyh16
// @match https://www.perplexity.ai/*
// @updateURL https://gist.github.com/cjanietz/703a88924e50e1a30cb6ffc52bc52bd9/raw/userscript.js
// @downloadURL https://gist.github.com/cjanietz/703a88924e50e1a30cb6ffc52bc52bd9/raw/userscript.js
// @grant none
// @run-at document-end
@lyh16
lyh16 / docker-iptables-fix.sh
Last active April 14, 2023 18:01 — forked from pedrolamas/docker-iptables-fix.sh
Script to fix Docker iptables on Synology NAS
#!/bin/bash
currentAttempt=0
totalAttempts=10
delay=15
while [ $currentAttempt -lt $totalAttempts ]
do
currentAttempt=$(( $currentAttempt + 1 ))
echo "Attempt $currentAttempt of $totalAttempts..."
@lyh16
lyh16 / bind.c
Created July 21, 2022 08:39 — forked from nolanlum/bind.c
LD_PRELOAD library to make bind and connect use a specific IP address. Now works with IPv6.
/*
* Copyright (c) 2014 Nolan Lum <nolan@nolm.name>
*
* Updated to support IPv6. Use the environment variable BIND_ADDR6.
*/
/*
Copyright (C) 2000 Daniel Ryde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public