Skip to content

Instantly share code, notes, and snippets.

View ThexXTURBOXx's full-sized avatar
💻
Working

Nico Mexis ThexXTURBOXx

💻
Working
View GitHub Profile
@wenlilearn
wenlilearn / wsl2-network.ps1
Last active August 5, 2021 18:31 — forked from xmeng1/wsl2-network.ps1
WSL2 Port forwarding port to linux
$remoteport = wsl hostname -I
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
if( $found ){
$remoteport = $matches[0];
} else{
echo "The Script Exited, the ip address of WSL 2 cannot be found";
exit;
}
@Treeki
Treeki / TurnipPrices.cpp
Last active May 25, 2025 06:02
AC:NH turnip price calculator
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// munged from https://github.com/simontime/Resead
namespace sead
{
class Random
{
@bellbind
bellbind / bchcode-example.js
Last active March 5, 2024 14:27
[JavaScript] Programming Polynomial and Galois Field and Implementing Reed-Solomon code
import {PF} from "./pf.js";
import {GF} from "./gf.js";
import {GF2n} from "./gf2n.js";
import {BCHCode} from "./bchcode.js";
import {Polynomial, PolynomialUtils} from "./polynomial.js";
{
console.log("[BCHCode with GF]");
const gf = GF(PF(2), 4, [1, 1, 0, 0, 1]);
@xmeng1
xmeng1 / wsl2-network.ps1
Created July 14, 2019 06:50
WSL2 Port forwarding port to linux
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '"
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
if( $found ){
$remoteport = $matches[0];
} else{
echo "The Script Exited, the ip address of WSL 2 cannot be found";
exit;
}
@JuanjoSalvador
JuanjoSalvador / downloader.py
Last active June 11, 2024 06:58
Extracts and decrypt a list of adf.ly links from a forum's post
# -*- coding: utf-8 -*-
import base64, requests, os, re, sys
from bs4 import BeautifulSoup
def _crack(code):
zeros = ''
ones = ''
for n,letter in enumerate(code):
@MaximeFrancoeur
MaximeFrancoeur / HMAC.java
Last active November 18, 2021 08:50
Generating HMAC MD5/SHA1/SHA256 etc in Java
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.io.UnsupportedEncodingException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
public class HMAC {
public static void main(String[] args) throws Exception {
System.out.println(hmacDigest("The quick brown fox jumps over the lazy dog", "key", "HmacSHA1"));
}
@psayre23
psayre23 / gist:c30a821239f4818b0709
Last active May 21, 2025 16:22
Runtime Complexity of Java Collections
Below are the Big O performance of common functions of different Java Collections.
List | Add | Remove | Get | Contains | Next | Data Structure
---------------------|------|--------|------|----------|------|---------------
ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array
LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List
CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array