Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name TorrentLeech V5 Enhancer
// @namespace https://openuserjs.org/scripts/Sandbird/TorrentLeech_V5_Enhancer
// @description Enhance TorrentLeech
// @updateURL https://openuserjs.org/meta/Sandbird/TorrentLeech_V5_Enhancer.meta.js
// @include https://torrentleech.org/torrents/*
// @include https://www.torrentleech.org/torrents/*
// @include https://torrentleech.cc/torrents/*
// @include https://www.torrentleech.cc/torrents/*
// @resource trakt_btn https://rawgit.com/Sandbird/TL/master/tr.png
@cobyism
cobyism / gh-pages-deploy.md
Last active May 7, 2024 18:46
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@sts10
sts10 / rust-command-line-utilities.markdown
Last active May 7, 2024 18:45
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@Hiroki-Kawakami
Hiroki-Kawakami / ContentView.swift
Last active May 7, 2024 18:38
SwiftUI Change Status Bar Color with UIWindow
//
// ContentView.swift
// StatusBarTest
//
// Created by hiroki on 2021/02/11.
//
import SwiftUI
struct ContentView: View {
@UnknownWitcher
UnknownWitcher / potato_patcher.pyw
Last active May 7, 2024 18:37 — forked from BluBb-mADe/potato_patcher.py
Generic Voicemeeter Potato in-memory patch
import os
import sys
import subprocess
import traceback
try:
from pymem import Pymem, process, exception
from win11toast import notify
import psutil
@radovankavicky
radovankavicky / LandGrid.js
Created December 13, 2016 08:41 — forked from rbrath/LandGrid.js
Equal Size Cartogram
var landGrid = [
{
"X": "1",
"Y": "1"
},
{
"X": "1",
"Y": "2"
},
{
@laobubu
laobubu / ABOUT.md
Last active May 7, 2024 18:37
A very simple HTTP server in C, for Unix, using fork()

Pico HTTP Server in C

This is a very simple HTTP server for Unix, using fork(). It's very easy to use

How to use

  1. include header httpd.h
  2. write your route method, handling requests.
  3. call serve_forever("12913") to start serving on port 12913
@BluBb-mADe
BluBb-mADe / potato_patcher.py
Last active May 7, 2024 18:36
Generic Voicemeeter Potato in-memory patch
import os
import sys
import time
import subprocess
import traceback
from pymem import Pymem, process, exception
#############################################################################################
# This is an in-memory patch that launches and patches Voicemeeter Potato in memory on startup.
@pavlov99
pavlov99 / haversine.scala
Created December 19, 2016 07:52
Spherical distance calcualtion based on latitude and longitude with Apache Spark
// Based on following links:
// http://andrew.hedges.name/experiments/haversine/
// http://www.movable-type.co.uk/scripts/latlong.html
df
.withColumn("a", pow(sin(toRadians($"destination_latitude" - $"origin_latitude") / 2), 2) + cos(toRadians($"origin_latitude")) * cos(toRadians($"destination_latitude")) * pow(sin(toRadians($"destination_longitude" - $"origin_longitude") / 2), 2))
.withColumn("distance", atan2(sqrt($"a"), sqrt(-$"a" + 1)) * 2 * 6371)
>>>
+--------------+-------------------+-------------+----------------+---------------+----------------+--------------------+---------------------+--------------------+------------------+
|origin_airport|destination_airport| origin_city|destination_city|origin_latitude|origin_longitude|destination_latitude|destination_longitude| a| distance|
#!/usr/bin/env bash
# Abort sign off on any error
set -e
# Start the benchmark timer
SECONDS=0
# Repository introspection
OWNER=$(gh repo view --json owner --jq .owner.login)