Skip to content

Instantly share code, notes, and snippets.

View ModsByMorgue's full-sized avatar

Morgue ModsByMorgue

  • United States
View GitHub Profile
@ModsByMorgue
ModsByMorgue / tinyweb.md
Last active December 3, 2023 07:45
a tiny list of (standalone) bare-bone web apps

A list of tiny (mostly single file) web apps that don't use nodejs, composer, bower, etc.

Blog / CMS / Wiki

Microblogging in a single file

https://github.com/zichy/vicco

Aiming single file script and performance, a tiny flat file PHP blog engine without database.

https://github.com/sukualam/sedotpress

@ModsByMorgue
ModsByMorgue / RsaExample.java
Created April 12, 2023 20:16 — forked from nielsutrecht/RsaExample.java
Example of RSA generation, sign, verify, encryption, decryption and keystores in Java
import javax.crypto.Cipher;
import java.io.InputStream;
import java.security.*;
import java.util.Base64;
import static java.nio.charset.StandardCharsets.UTF_8;
public class RsaExample {
public static KeyPair generateKeyPair() throws Exception {
KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA");
@ModsByMorgue
ModsByMorgue / RSA.java
Created April 12, 2023 20:10 — forked from ukdave/RSA.java
Java RSA
import java.math.BigInteger;
import java.security.SecureRandom;
import java.util.Arrays;
import java.util.Random;
import static java.math.BigInteger.ONE;
public class RSA {
public static void main(String[] args) {
// https://simple.wikipedia.org/wiki/RSA_(algorithm)
@ModsByMorgue
ModsByMorgue / java_download.sh
Created March 13, 2023 13:15 — forked from wavezhang/java_download.sh
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz
@ModsByMorgue
ModsByMorgue / news_system.php
Last active January 10, 2021 23:39
Minimal News System Example Project - PHP & JSON
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<?
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
/**
* LICENSE: https://creativecommons.org/publicdomain/zero/1.0/ (THE CODE BELONGS TO THE INTERNET, DO WHATEVER YOU WANT WITH IT)
* http://www.sitemaps.org/protocol.php
* http://en.wikipedia.org/wiki/Sitemaps
* http://en.wikipedia.org/wiki/Sitemap_index
@ModsByMorgue
ModsByMorgue / matrix.html
Last active March 19, 2021 23:10
Matrix (Digital Rain) Falling Code Template [HTML JavaScript]
<!--
YOU CAN SEE A LIVE PREVIEW HERE:
https://morgue.cc/project/digital_rain/
https://www.rgbtohex.net/
https://www.youtube.com/watch?v=NuMf5J-BI_w
https://matrix.fandom.com/wiki/Matrix_code
-->
<style type="text/css">
html, body {
@ModsByMorgue
ModsByMorgue / secure.php
Last active April 13, 2024 07:54
Minimal PHP login script. No database. No installation. 100 lines of code.
<?php
// RECENT EDITS DONE VIA MOBILE - NOT FINISHED - AND FOR SURE WONT WORK
if (isset($_GET["password"])) {
die('<h1>Your Hash:</h1>'.secure($_GET["password"]).'<hr>');
}
session_generate_id();
session_name("pseudo");
@ModsByMorgue
ModsByMorgue / RsaUtils.java
Last active November 2, 2019 12:28
An RSA Utility class. Used for generating RSA key pairs and encrypting / decrypting data.
import java.io.File;
import java.io.FileOutputStream;
import java.security.KeyFactory;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.spec.PKCS8EncodedKeySpec;
@ModsByMorgue
ModsByMorgue / DirectionUtil.java
Last active January 9, 2021 00:24
jMonkeyEngine Direction Utility Class
package mygame;
import com.jme3.math.FastMath;
import com.jme3.math.Quaternion;
import com.jme3.scene.Spatial;
/**
* Converts an object's yaw rotation value into a degree between 0 and 360.
* This is meant to emulate a real-world compass.
*