Skip to content

Instantly share code, notes, and snippets.

View jasonw4331's full-sized avatar

Jason Wynn jasonw4331

View GitHub Profile
@MeguminSama
MeguminSama / Discord Experiments.js
Last active May 13, 2024 20:50
Discord Experiments.js
let cache; webpackChunkdiscord_app.push([["wp_isdev_patch"], {}, r => cache=r.c]);
var UserStore = Object.values(cache).find(m => m?.exports?.default?.getUser).exports.default;
var actions = Object.values(UserStore._dispatcher._actionHandlers._dependencyGraph.nodes);
var user = UserStore.getCurrentUser();
actions.find(n => n.name === "ExperimentStore").actionHandler.CONNECTION_OPEN({
type: "CONNECTION_OPEN", user: {flags: user.flags |= 1}, experiments: [],
});
actions.find(n => n.name === "DeveloperExperimentStore").actionHandler.CONNECTION_OPEN();
webpackChunkdiscord_app.pop(); user.flags &= ~1; "done";
@karlwilbur
karlwilbur / YouTube-ad-skipper.js
Created December 1, 2020 19:49
YouTube Ad Skipper Bookmarklet
javascript:(function()%7Bfunction callback()%7B(function(%24)%7Bvar jQuery%3D%24%3Bwindow.%24%3D%24%3BsetInterval("window.%24('.ytp-ad-skip-button') %26%26 window.%24('.ytp-ad-skip-button').click()"%2C 1000)%7D)(jQuery.noConflict(true))%7Dvar s%3Ddocument.createElement("script")%3Bs.src%3D"https%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fjquery%2F1.11.1%2Fjquery.min.js"%3Bif(s.addEventListener)%7Bs.addEventListener("load"%2Ccallback%2Cfalse)%7Delse if(s.readyState)%7Bs.onreadystatechange%3Dcallback%7Ddocument.body.appendChild(s)%3B%7D)()
@tdcosta100
tdcosta100 / WSL2GUIXvnc-en.md
Last active May 13, 2024 16:22
A tutorial to use GUI in WSL2 replacing original XServer by Xvnc, allowing WSL to work like native Linux, including login screen

WSL2 with GUI using Xvnc

In this tutorial, we will setup GUI in WSL2, and access it using VNC. No additional software outside WSL (like VcXsrv) is required, except, of course, a VNC Viewer (RealVNC, TightVNC, TigerVNC, UVNC, etc, all of them might work flawlessly).

The key component we need to install is tigervnc-standalone-server.

For this setup, I will use Ubuntu 20.04 LTS (Focal Fossa, unfortunately 22.04 does not work), and install GNOME Desktop. Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the Sample screenshots section for examples.

So let's go. First, we need a working WSL2 installation.

@HBIDamian
HBIDamian / Run Down PocketMine Installer.ps1
Last active August 13, 2023 19:21
Run Down Installer for PocketMine-MP (PowerShell).
$host.ui.RawUI.WindowTitle = "Run Down PocketMine-MP Installer"
$WebClient = New-Object System.Net.WebClient
# Setting this to true will delete all files in the current directory.
# Setting this to false will replace specific files in the current directory with the latest versions.
$global:FreshInstallMode = $false
# Change this to the version of PHP and PocketMine-MP you want to install.
$global:PHPVer = "8.2-latest"
$global:PMMPVer = "PM5"
@samoshkin
samoshkin / postman_vs_insomnia_comparison.md
Created November 6, 2018 17:42
Comparison of API development environments: Postman vs Insomnia

Postman vs Insomnia comparison

Postman | API Development Environment https://www.getpostman.com
Insomnia REST Client - https://insomnia.rest/

Features                                        Insomnia Postman Notes
Create and send HTTP requests x x
Authorization header helpers x x Can create "Authorization" header for you for different authentication schemes: Basic, Digest, OAuth, Bearer Token, HAWK, AWS
1357382277|Shoghi Cervantes released PocketMine-MP version Alpha_1.0.4
1357477557|Shoghi Cervantes released PocketMine-MP version Alpha_1.0.5
1358012689|Shoghi Cervantes released PocketMine-MP version Alpha_1.0.6
1358968579|Shoghi Cervantes released PocketMine-MP version Alpha_1.0.7
1359218042|Shoghi Cervantes released PocketMine-MP version Alpha_1.0.8
1359652831|Shoghi Cervantes released PocketMine-MP version Alpha_1.1
1359739705|Shoghi Cervantes released PocketMine-MP version Alpha_1.1.1
1362577104|Shoghi Cervantes released PocketMine-MP version Alpha_1.2
1363435928|Shoghi Cervantes released PocketMine-MP version Alpha_1.2.1
1368276142|Shoghi Cervantes released PocketMine-MP version Alpha_1.2.2
@jasonw4331
jasonw4331 / AutoOp.php
Last active July 8, 2018 15:42
Automatically OPs players on respawn
<?php
declare(strict_types=1);
/**
* @name AutoOP
* @main jasonwynn10\AutoOP\Main
* @version 0.1.0
* @api 3.0.0
* @description A plugin script which automatically grants all players OP on Respawn
* @author jasonwynn10
*/
@jasonw4331
jasonw4331 / PngToPlayer.php
Created October 15, 2017 16:35 — forked from robske110/PngToPlayer.php
Set a player's skin in PMMP
<?php
$path = 'your/path/to/skin.png';
$img = @imagecreatefrompng($path);
$bytes = '';
$l = (int) @getimagesize($path)[1];
for ($y = 0; $y < $l; $y++) {
for ($x = 0; $x < 64; $x++) {
$rgba = @imagecolorat($img, $x, $y);
@robske110
robske110 / PngToPlayer.php
Last active August 13, 2020 22:59 — forked from jasonw4331/PngToPlayer.php
Set a player's skin in PMMP
<?php
$path = 'your/path/to/skin.png';
$img = @imagecreatefrompng($path);
$bytes = '';
$l = (int) @getimagesize($path)[1];
for ($y = 0; $y < $l; $y++) {
for ($x = 0; $x < 64; $x++) {
$rgba = @imagecolorat($img, $x, $y);
@dktapps
dktapps / run.php
Last active February 15, 2023 04:52
A basic UDP proxy used to bypass client-side Xbox Live authentication in MCPE 1.2.
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*