Skip to content

Instantly share code, notes, and snippets.

View RealityRipple's full-sized avatar
🪂
If at first you don't succeed, skydiving is not for you.

Andrew Sachen RealityRipple

🪂
If at first you don't succeed, skydiving is not for you.
View GitHub Profile
@RealityRipple
RealityRipple / mantisUpdate.php
Last active May 14, 2018 20:03
PHP Script for updating MantisBT. Designed for use in a Cron job.
<?php
ini_set('display_errors',1);
ignore_user_abort(true);
error_reporting(E_ALL);
header('Content-Type: text/html; charset=utf-8');
header('Content-Encoding: none;');
$cron = $argv[1];
if ($cron != 'cron')
return('This needs to be run from CRON.');
@RealityRipple
RealityRipple / openpgp.txt
Created February 28, 2018 11:20
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:2be391ef8ef9db1e9bf546620b7c73813443493a]
@RealityRipple
RealityRipple / JSON-Playlist.jopl
Last active August 27, 2018 12:05
JSON Playlist File Definition
{
"Title": "Example JavaScript Object Notation Playlist File",
"Time": "00:00:10:25.845",
"Tracks":
[
{
"Title": "Track 1",
"Artist": "The Band",
"Album": "The Record",
"Time": "02:15.600",
@RealityRipple
RealityRipple / login.php
Created June 21, 2019 04:53
Encrypt Passwords Over HTTP using RSA
<?php
function parseRequest()
{
if (!isset($_POST['username']) || empty($_POST['username']))
return 'You did not enter a username';
if (!isset($_POST['password']) || empty($_POST['password']))
return 'You did not enter a password';
$request = array();
$request['username'] = $_POST['username'];
$ePass = $_POST['password'];
@RealityRipple
RealityRipple / notes.md
Created August 18, 2019 22:16
Building a Cryptocurrency Transaction (DOGE Example)

Building a Cryptocurrency Transaction

Written by Andrew Sachen (2019)

Share and Enjoy (Public Domain)

Cryptocurrency can be as confusing as it is intriguing. It can also be very dangerous. There are also environmental concerns. Those are all outside the scope of this example. This just shows you how to build a valid transaction (in Dogecoin) using only JavaScript within the browser (aside from requesting the transactions to use as Inputs and sending the completed transaction through a public API website).


Requirements

Additions to AES Encryption in Zip Files

I. Foreward

AES Encryption is considered a safe encryption algorithm. However, the implementation of AES as described by the Zip file standard (see https://www.winzip.com/win/en/aes_info.html) is sorely lacking in implementation.
The issues with the implementation are not in the execution of AES-CTR itself, but with the PBKDF2 constants used by all existing compatible archiving software. Below is my attempt to improve upon the existing Zip-AES standard as best as possible without interfering with the parent Zip standard or with software that reads or writes Zip files.

II. New AES Encrypted file storage format

@RealityRipple
RealityRipple / update.sh
Created December 29, 2020 22:54
Arch Linux AUR Auto-Update Script
#!/bin/sh
for d in */; do
cd $d
git reset --hard &>/dev/null
git clean -xdf &>/dev/null
git fetch
UPSTREAM=${1:-'@{u}'}
LOCAL=$(git rev-parse @)
REMOTE=$(git rev-parse "$UPSTREAM")
if [ "$LOCAL" = "$REMOTE" ]; then
@RealityRipple
RealityRipple / slackbuilder.sh
Last active January 8, 2021 22:00
Slackware SlackBuild Package Manager (With Dependency Resolver)
#!/bin/bash
if [ -z "${PATH-}" ]; then
export PATH="/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin"
fi
if ! { [[ "$PATH" == *":/bin:"* ]] || [[ "$PATH" == "/bin:"* ]] || [[ "$PATH" == *":/bin" ]]; }; then
PATH="$PATH:/bin"
fi
if ! { [[ "$PATH" == *":/usr/bin:"* ]] || [[ "$PATH" == "/usr/bin:"* ]] || [[ "$PATH" == *":/usr/bin" ]]; }; then
PATH="$PATH:/usr/bin"
@RealityRipple
RealityRipple / timestamp.php
Created June 14, 2021 07:46
RFC 3161 and Authenticode Timestamping Server
<?php
$GLOBALS['brand'] = 'Generic Brand';
$GLOBALS['url'] = 'http://time.generic.site';
$GLOBALS['cert'] = './ts/';
$GLOBALS['temp'] = '/tmp/';
/*
Requirements
============
PHP
@RealityRipple
RealityRipple / queue1.html
Last active February 14, 2022 03:54
Track Display for Streamer Song List
<!doctype html>
<html>
<head>
<script>
var userID = 'your_channel'; /* twitch channel, lowercase */
var index = 1; /* queue index, starting from 1 for the next song and counting up */
var fadePad = 32; /* left and right margin */
var scrollRate = 20; /* lower is faster */
var interval = 2; /* update time in seconds */
var fadeTime = 0.5; /* fade speed in seconds */