Skip to content

Instantly share code, notes, and snippets.

View ForsakenHarmony's full-sized avatar
:shipit:
tis and tat

hrmny ForsakenHarmony

:shipit:
tis and tat
View GitHub Profile
@ForsakenHarmony
ForsakenHarmony / protocol.md
Last active May 24, 2024 20:20
dbx DriveRack PA2 protocol exploration

PA2 protocol

  • port: 19272
  • protocol: text over TCP (UDP might also be possible)

PA2 Control

Searching for devices

Broadcast (UDP)

function h (tagName, attributes = {}, children = []) {
return {
tagName,
attributes,
children,
};
}
function diffAttrs (element, attributes) {
const newAttrs = Object.keys(attributes);
@ForsakenHarmony
ForsakenHarmony / gql-ws.js
Last active July 10, 2018 15:26
Graphql over websockets
import { watch as watchOnline } from 'is-offline';
import Sockette from 'sockette';
const msg_types = {
GQL_CONNECTION_INIT: 'connection_init', // Client -> Server
GQL_CONNECTION_ACK: 'connection_ack', // Server -> Client
GQL_CONNECTION_ERROR: 'connection_error', // Server -> Client
GQL_CONNECTION_TERMINATE: 'connection_terminate', // Client -> Server
GQL_START: 'start', // Client -> Server
GQL_DATA: 'data', // Server -> Client
@ForsakenHarmony
ForsakenHarmony / image.css
Created January 10, 2018 19:57
Image viewer popup in preact
.background {
will-change: opacity;
transition: opacity 250ms;
visibility: hidden;
opacity: 0;
position: fixed;
top: 0;
left: 0;

Keybase proof

I hereby claim:

  • I am ForsakenHarmony on github.
  • I am harmony (https://keybase.io/harmony) on keybase.
  • I have a public key whose fingerprint is DDB8 5695 E5CA 0694 4319 DF7F 0252 6D47 60B2 6B33

To claim this, I am signing this object:

// Copyright (c) 2005 Tom Wu
// All Rights Reserved.
// See "LICENSE" for details.
/*
* Copyright (c) 2003-2005 Tom Wu
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
public string GenerateSteamGuardCodeForTime(long time) {
if(this.SharedSecret == null || this.SharedSecret.Length == 0) {
return "";
}
Console.WriteLine(time);
byte[] sharedSecretArray = Convert.FromBase64String(this.SharedSecret);
byte[] timeArray = new byte[8];
package com.icekat.thercmod.items;
import com.icekat.thercmod.ClientTickHandler;
import com.icekat.thercmod.RCM_Main;
import com.icekat.thercmod.network.PacketHandler;
import com.icekat.thercmod.network.SimplePacket;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;