Skip to content

Instantly share code, notes, and snippets.

View Nullreff's full-sized avatar

Nullreff Nullreff

View GitHub Profile
@Nullreff
Nullreff / recovery.sh
Last active October 4, 2022 17:04
Arch Recovery
cryptsetup luksOpen /dev/nvme0n1p2 encrypted_volume
mkdir /mnt/install
mount /dev/mapper/encrypted_volume -o subvol=@ /mnt/install
mount /dev/mapper/encrypted_volume -o subvol=@home /mnt/install/home
arch-chroot /mnt/install
su nullreff
cd ~
@Nullreff
Nullreff / spaceneedle.sh
Last active February 2, 2022 05:57
Generates a skybox image from the space needle panorama
#!/bin/bash -e
# Install dependencies
# sudo apt install -y curl jq imagemagick rclone
# Set up crontab
# 0 * * * * /home/nullreff/spaceneedle/spaceneedle.sh > /home/nullreff/spaceneedle/crontab.log
mkdir -p ~/spaceneedle/
cd ~/spaceneedle/
# Tips:
# Export from Activity -> Statements -> Custom -> Activity download
# Suggested transaction type: "Balance affecting"
# Paypal's default fields in 2018 were:
# "Date","Time","TimeZone","Name","Type","Status","Currency","Gross","Fee","Net","From Email Address","To Email Address","Transaction ID","Shipping Address","Address Status","Item Title","Item ID","Shipping and Handling Amount","Insurance Amount","Sales Tax","Option 1 Name","Option 1 Value","Option 2 Name","Option 2 Value","Reference Txn ID","Invoice Number","Custom Number","Quantity","Receipt ID","Balance","Address Line 1","Address Line 2/District/Neighborhood","Town/City","State/Province/Region/County/Territory/Prefecture/Republic","Zip/Postal Code","Country","Contact Phone Number","Subject","Note","Country Code","Balance Impact"
# This rules file assumes the following more detailed fields, configured in "Customize report fields":
# "Date","Time","TimeZone","Name","Type","Status","Currency","Gross","Fee","Net","From Email Address","To Email Add
@Nullreff
Nullreff / Ideas
Last active February 2, 2018 23:06
Test for the redpile programming language
- Parser/Spec for high level languages (Redpile and others)
- Use parser combinators?
- How to propagate errors from the lower level back up?
- How to make errors at the higher level easier to understand.
- Translator from Text -> Data Structure
- Mid level language (NLISP)
- "Type Oriented Programming" (TOP)
- LISP
- Everything is either the definition of a type or assertions about types
- Allows for nested definitions
@Nullreff
Nullreff / magicq.sh
Created April 28, 2016 20:48
magicq
#!/bin/bash
MAGICQ_DIR=$HOME/software/magicq/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MAGICQ_DIR
cd $MAGICQ_DIR
./magicq
> node 0,0,0 torch direction:up
> node 1..5,0,0 wire
> tickv 2
=== Tick 0 ===
--- Pass 0 (6 nodes)---
0,0,0 TORCH direction:UP power:0
4,0,0 WIRE power:0
1,0,0 WIRE power:0
5,0,0 WIRE power:0
2,0,0 WIRE power:0
#!/usr/bin/env ruby
require 'erb'
COLORS = 256
abort 'You must provite a file name' unless ARGV.length == 1
image = ARGV[0]
abort 'You must provite a valid file' unless File.exist?(image)
#include "include/controller.h"
int runThreefizer(const arguments* args)
{
bool mac_status = true;
bool running = true;
bool threads_active = false;
bool valid = false;
int32_t error = 0;
progress_t progress;
@Nullreff
Nullreff / wire.lua
Created November 3, 2014 21:25
Wire Debugging
redpile.behavior('power_wire', {'POWER'}, function(node, messages)
local debug = node.location.x == 0 and node.location.y == 0 and (node.location.z == -2 or node.location.z == -3)
if debug then
print("--- Node " .. node.location.x .. "," .. node.location.y .. "," .. node.location.z .. " ---")
print("Message count: " .. messages.count)
print("Input:")
messages:each(function(message)
print(" " .. message.value .. " from " .. message.source.x .. "," .. message.source.y .. "," .. message.source.z)
end)
end
@Nullreff
Nullreff / home.css
Created October 6, 2014 17:00
Website
#welcome {
width: 800px;
margin: 20px auto;
padding: 20px;
}
p.links > a {
text-decoration: none;
color: black;
margin-left: 10px;