Skip to content

Instantly share code, notes, and snippets.

View Scarsz's full-sized avatar
🐒
Programming Primate

Austin Shapiro Scarsz

🐒
Programming Primate
View GitHub Profile
@aamiaa
aamiaa / RevertNewLayout.md
Last active July 7, 2024 14:56
Revert New Discord Layout

The original snippet no longer works!

On 02/09/2024 at around 8pm UTC, Discord flipped an experiment (2023-09_mobile_redesign_override_toggles) which ignores the layout toggle that this script relied on.

If you want to continue using the old layout, you can either use a modded mobile client (such as Vendetta) to disable that experiment, or downgrade to an old version of the app.

Method 1 - Downgrading (Android)

Tip

Use this one if you want a fast, beginner-friendly solution and don't mind using a version from November 2023

  1. Download version 205.15 of Discord mobile app from ApkMirror
@Aldaviva
Aldaviva / wmp_h.265_hevc.md
Last active June 27, 2024 18:18
Play H.265/HEVC videos in Windows Media Player (Classic) without a third-party codec pack or media player. Tested using Microsoft.HEVCVideoExtension_2.0.60091.0_x64__8wekyb3d8bbwe with WMP 12.0.20348.1311 on Windows Server 2022 21H2 and 12.0.22621.1105 on Windows 11 22H2.

Download

  1. Go to https://store.rg-adguard.net.
  2. Search for the HEVC Video Extensions from Device Manufacturer (Microsoft.HEVCVideoExtension) app by entering the following store URL.
    https://www.microsoft.com/en-us/p/hevc-video-extensions-from-device-manufacturer/9n4wgh0z6vhq
    
    • Do not use the normal HEVC Video Extensions app URL, because that can't play HEVC videos in Windows Media Player for some inscrutable reason.
  3. Download the x64 appx file, or whatever your Windows architecture is.
    • You may have to right click › Save Link As because the URL scheme is http, not https, if your browser is set to enforce HTTPS-only mode.
  • If it tries to save as a filename that's just a GUID, you may copy the correct .appx filename and save it as that instead.
import requests
from tqdm import tqdm
def download_file_from_google_drive(id, destination):
def get_confirm_token(response):
for key, value in response.cookies.items():
if key.startswith('download_warning'):
return value
return None
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
public delegate void ThreadQueueWorkDelegate<T>(T task);
/// <summary>
/// ThreadQueue
/// Made by BahNahNah
@joepie91
joepie91 / vpn.md
Last active July 20, 2024 13:53
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@yalayabeeb
yalayabeeb / Memory.cs
Last active October 21, 2018 14:11
A class to read/write mainly integers to a process's memory address.
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
public class Memory
{
#region WinAPI
[DllImport("kernel32.dll")]
private static extern IntPtr OpenProcess(uint processAccess, bool bInheritHandle, int processId);
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.IO;
using System.Runtime.InteropServices;
/// <summary>
/// Dll Injector
/// Made by BahNahNah
@jahe
jahe / gradle-cheatsheet.gradle
Last active December 8, 2022 07:22
Gradle Cheatsheet
// imports a couple of java tasks
apply plugin: "java"
// List available tasks in the shell
> gradle tasks
// A Closure that configures the sourceSets Task
// Sets the main folder as Source folder (where the compiler is looking up the .java files)
sourceSets {
main.java.srcDir "src/main"
@pigeonhands
pigeonhands / eSock.cs
Last active April 18, 2023 06:27
eSock 2
using System.Security.Cryptography;
using System;
using System.IO;
using System.IO.Compression;
using System.Net;
using System.Net.Sockets;
using System.Runtime.Serialization.Formatters.Binary;
using System.Text;
using System.Threading;