This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from sys import stdout | |
from PySFML import * | |
from random import random | |
import time as timec | |
import copy | |
''' | |
_ _ _ _ _ _ _ _ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <hidapi/hidapi.h> | |
#include <stdint.h> | |
#include <string.h> | |
// Build: | |
// gcc rifts-init.c -lhidapi-libusb -o rifts-init | |
void printBuffer(char *buff, int length) { | |
for (int i = 0; i < length; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <hidapi/hidapi.h> | |
void printBuffer(char *buff, int length) { | |
for (int i = 0; i < length; i++) { | |
printf("%02x ", buff[i] & 0xFF); | |
} | |
printf("\n"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
TBS ECP3 FPGA based cards PCIe driver | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"log" | |
"net" | |
"strings" | |
"time" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
var constellationLut []map[byte]byte | |
var constellationLut []map[byte]byte | |
func rotateByte(v byte, n int, conj bool) byte { | |
byteData := make([]int, 8) | |
outByteData := make([]int, 8) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# 64 bit preamble (16 bytes) | |
# Reserved Reserved txdtrtscale enphpwdn manppol enmaninv enmanch enwhite | |
# EZRADIOPRO_MODULATION_MODE_CONTROL_1 = 0x0D = 0b00 001101 | |
# trclk[1] trclk[0] dtmod[1] dtmod[0] eninv fd[8] modtyp[1] modtyp[0] | |
# EZRADIOPRO_HEADER_CONTROL_2IOPRO_MODULATION_MODE_CONTROL_2 = 0x23 = 0b00100011 | |
# EZRADIOPRO_HEADER_CONTROL_2 = EZRADIOPRO_HDLEN_2BYTE | EZRADIOPRO_SYNCLEN_2BYTE | |
# EZRADIOPRO_DATA_ACCESS_CONTROL = EZRADIOPRO_ENPACTX | EZRADIOPRO_ENPACRX | EZRADIOPRO_ENCRC | EZRADIOPRO_CRC_16 | |
# Sync Word: 2A D4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define POLY 0xA001 | |
#define POLY 0x8005 | |
unsigned crc16(unsigned crc, unsigned char *buf, size_t len) | |
{ | |
while (len--) { | |
crc ^= *buf++; | |
crc = crc & 1 ? (crc >> 1) ^ POLY : crc >> 1; | |
crc = crc & 1 ? (crc >> 1) ^ POLY : crc >> 1; | |
crc = crc & 1 ? (crc >> 1) ^ POLY : crc >> 1; | |
crc = crc & 1 ? (crc >> 1) ^ POLY : crc >> 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SPI.h> | |
#include <ADF4350.h> | |
#define COM_PIN D0 | |
ADF4350 PLL(COM_PIN); | |
void setup(){ | |
SPI.begin(); | |
SPI.setClockDivider(SPI_CLOCK_DIV4); | |
SPI.setDataMode(SPI_MODE0); |