Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
# This file allows modifying a a safeloader factory image.
# It can be used to transplant a partition from one image into another, or to update the
# firmware version info.
# The procedure to calculate the hash and the required salt are described at:
# https://github.com/openwrt/openwrt/blob/master/tools/firmware-utils/src/tplink-safeloader.c
import argparse
import binascii
#!/bin/bash
# Usage (inside the data folder):
# fixvec.sh *.vec
for f in "$@"; do
cat "$f" | tr "," "." > temp.txt
mv -f temp.txt "$f"
done
@scribblemaniac
scribblemaniac / generateGif.sh
Created December 1, 2017 21:38
Generates an animated GIF out of all PNGs in the current directory
#! /bin/bash
# Made by Nick, converted to bash by scribblemaniac
# Requires imagemagick in the path
DNAME="untitled_animation"
if [ $# -ge 1 ]; then
DNAME="$1"
fi
@scribblemaniac
scribblemaniac / UoPeopleRefresh.user.js
Created February 18, 2017 03:21
Refreshes the main UoPeople page to stay logged in
// ==UserScript==
// @name UoPeople Refresh
// @namespace com.deptuck.connor
// @include https://my.uopeople.edu/
// @version 1
// @grant none
// ==/UserScript==
setTimeout((function() { window.location.reload(true); }), 60 * 60 * 1000);
@scribblemaniac
scribblemaniac / CreateKochSnowflake.cpp
Created August 5, 2016 22:08
Creates an animated Koch Snowflake in VPaint's .vec format
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <array>
#include <utility>
#include <map>
#include <cmath>
using namespace std;
@scribblemaniac
scribblemaniac / ScrollGame.html
Created June 12, 2016 23:09
Scrollercoaster
<!DOCTYPE html>
<!-- Hey there, thanks for checking out this silly little game.
This was designed for people with a mouse scrollbar that is capable of "coasting".
If you have one such mouse, load up this game and flicking it down as hard as you
can to see how many pixels you can scroll in a single flick. My personal best is
a score of 1319050 and a time of 34.3 seconds, so try to beat that!
This file is public domain, do whatever you want with it.
--!>
<html>
<head>
@scribblemaniac
scribblemaniac / VPaintAsteroidCreator.cpp
Created August 14, 2015 01:25
Creates asteroids (4-cusped hypocycloid) in VPaint's .vec format
/*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
@scribblemaniac
scribblemaniac / cross-converter.sh
Created August 1, 2015 00:00
Vergence converter for animated stereograms
#!/bin/bash
# This script converts side-by-side animated stereograms between parallel and cross-eyed viewing methods.
# In other words, it splits a video vertically in the middle and swaps the two halves
# Dependencies:
# FFmpeg
# Usage:
# ./cross-converter.sh <input_file> <output_file>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.