Skip to content

Instantly share code, notes, and snippets.

@SaeedDev94
SaeedDev94 / #tunnel-xray
Last active December 22, 2024 01:20
Asuswrt-Merlin: Tunnel clients with XTLS/Xray-core
#!/bin/sh
REMOTE_SERVER="x.x.x.x"
INBOUND_ADDR="127.0.0.1"
INBOUND_PORT="10888"
TPROXY_CHAIN="XRAY_TPROXY"
GATEWAY_CHAIN="XRAY_GATEWAY"
EXCLUDE_MARK="5"
@grisha765
grisha765 / 6in4.rsc
Created December 22, 2024 01:14
6in4 update Dyn IP with api for mikrotik
# MikroTik Script: 6in4.rsc
# Purpose: Update PPPoe IP dynamically
:local apiKey "api_key"
:local tunnelId "tunnel_id"
:local fileName "last_pppoe_ip2.txt"
:local lastIP
:local currentIP
@tranquan
tranquan / xcode-keybindings-as-vscode.md
Last active December 22, 2024 01:20
Xcode KeyBindings as VSCode
@leandronsp
leandronsp / 001-server.bash
Last active December 22, 2024 01:17
A complete yet simple Web server (with login & logout system) written in Shell Script
#!/bin/bash
## Create the response FIFO
rm -f response
mkfifo response
function handle_GET_home() {
RESPONSE=$(cat home.html | \
sed "s/{{$COOKIE_NAME}}/$COOKIE_VALUE/")
}
@kohya-ss
kohya-ss / gradio_cmdrp.py
Created April 18, 2024 13:09
llama-cpp-python と gradio で command-r-plus を動かす
# Apache License 2.0
# 使用法は gist のコメントを見てください
import argparse
from typing import List, Optional, Union, Iterator
from llama_cpp import Llama
from llama_cpp.llama_tokenizer import LlamaHFTokenizer
from llama_cpp.llama_chat_format import _convert_completion_to_chat, register_chat_completion_handler
import llama_cpp.llama_types as llama_types
@kohya-ss
kohya-ss / llm_novelist_v1.py
Last active December 22, 2024 01:15
ローカルLLMに小説を書いてもらう
# Apache License 2.0
# 使用法は gist のコメントを見てください
import time
import argparse
import os
import json
import tomli
import traceback
from typing import Any, Dict, List, Optional, Union, Iterator
@sawaynm
sawaynm / Instructions.sh
Created December 22, 2024 01:12 — forked from GhazanfarMir/Instructions.sh
Install PHP7.2 NGINX and PHP7.2-FPM on Ubuntu 16.04
########## Install NGINX ##############
# Install software-properties-common package to give us add-apt-repository package
sudo apt-get install -y software-properties-common
# Install latest nginx version from community maintained ppa
sudo add-apt-repository ppa:nginx/stable
# Update packages after adding ppa
@nvhhr
nvhhr / customTimestamps.tsx
Last active December 22, 2024 01:08
modified CustomTimestamps for Vencord
/*
* Vencord, a Discord client mod
* Copyright (c) 2024 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import definePlugin, { OptionType } from "@utils/types";
import { definePluginSettings } from "@api/Settings";
import { Devs } from "@utils/constants";
import { Forms } from "@webpack/common";
@tung
tung / twitch-vod-chat.py
Last active December 22, 2024 01:05
Download chat from a Twitch VOD and print it to a terminal.
#!/usr/bin/env python3
#
# A script to download chat from a Twitch VOD and print it to a terminal.
# Chat will be downloaded all the way until it ends.
#
# Usage: TWITCH_CLIENT_ID=0123456789abcdef0123456789abcde twitch-vod-chat.py [video_id] [start]
#
# This script could break at any time, because Twitch's chat API is
# undocumented and likes to change at any time; in fact, this script was
@dqgorelick
dqgorelick / tidal_server.scd
Last active December 22, 2024 01:00
tidal server simple

SuperDirt.start // start server

Server.killAll // kill server

Quarks.gui // open samples folder

// set inputs & outputs // you will need to kill the server and restart when changing the input / output

// list all devices: