Skip to content

Instantly share code, notes, and snippets.

View honno's full-sized avatar
🛰️

Matthew Barber honno

🛰️
View GitHub Profile
@honno
honno / flashygoodness_extract.py
Created October 18, 2017 08:55
Quick Python script to extract the "archive" music from the flashygoodness site—it isn't available for purchase or download anywhere!
## Music in question https://www.flashygoodness.com/music/gallery/
import requests
import os
import xml.etree.ElementTree as ET
import urllib
import re
folder_name = r'flashygoodness'
@honno
honno / Dice.cs
Created March 17, 2018 15:42
Slot machine-like dice animation
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class DiceManager: MonoBehaviour {
/* component reference */
private Image image;
private TravelLightsDisplay hud;
__________________________________________________________________________
// __ ____ __ \\
| ________________________ \ /\ / **>><<***>><<***>><<***>><<***>> |
| / \ \/MM\/ Official Association |
| | .adAMMMAbn. | /\WW/\ HUNTER'S LICENSE |
| | dMMMMMMMMMMA. | _/ _\/_ \_ <<***>><<***>><<***>><<***>><<** |
| | 'HMMMMMMMMMMMl. | |
| | db\MMM^" "^j | NAME(-S): Matthew Roy AGE: 20 |
| | MMY : | SURNAME: Barber GENDER: Male |
| | ,M|`,----. ,---. | NICKNAME: Honno OCCUPATION: Student |
<?php
function para($msg) { echo "<p>$msg</p>"; }
function error($msg) {
$valid = false;
para($msg);
}
$name = trim($_REQUEST["name"]);
<?php
function isPalindrome($string) {
if (strlen($string) <= 1) {
return true;
} elseif (strtolower(substr($string, 0, 1)) == strtolower(substr($string, -1))) {
isPalindrome(substr($string, 1, -1));
} else {
return false;
}
}
<?php
$year = $_REQUEST["year"];
$rating = $_REQUEST["rating"];
$pdo = require 'connectdb.php';
$query = "
SELECT DISTINCT d.id, CONCAT(d.last_name, ', ', d.first_name) AS name
FROM directors d
window.onload = function() {
document.getElementById('find').onclick = findRequest;
};
function findRequest() {
var from = document.getElementById('from').value;
var to = document.getElementById('to').value;
var ajax = new XMLHttpRequest();
ajax.onload = injectDirections;
@honno
honno / find-crc32.py
Created July 26, 2019 07:15
Multiprocessing bruteforcing script to find a valid CRC32 checksum in a file which quotes said CRC32 value, i.e. a self-referential CRC32.
#!/usr/bin/python3
import logging
import argparse
import sys
import binascii
import multiprocessing as mp
from time import sleep
SLEEP_TIME = 0.1
@honno
honno / asda-order-to-csv.py
Last active February 20, 2020 08:34
Get a csv out of asda order summaries
#!/usr/bin/python3
import argparse
import sys
import csv
from bs4 import BeautifulSoup
import requests
if __name__ == "__main__":