Skip to content

Instantly share code, notes, and snippets.

@oysstu
oysstu / gog-mini-metro
Last active April 8, 2018 18:05
gog-mini-metro aur pkgbuild
# Maintainer: James Zhu <james.zhu.engineer at gmail.com>
pkgname=gog-mini-metro
pkgver=201712140945_gamma34
pkgrel=1
_gogrel=17216
_gamename=${pkgname#gog-}
_gamename=${_gamename//-/_}
@oysstu
oysstu / LV2016-x64-debian.sh
Created March 8, 2017 17:21
Installation of LabVIEW 2016 on debian
# apt install alien
# sudo mount LabVIEW2016.iso /media/iso
# Convert to debian packages
find /media/iso -name '*x86_64.rpm' -exec fakeroot alien -d -k --scripts {} +
find /media/iso -name '*noarch.rpm' -exec fakeroot alien -d -k --scripts {} +
# Install packages
find . -name '*.deb' -exec sudo alien -i --scripts {} +
@oysstu
oysstu / crc16.py
Last active November 29, 2023 12:38
Implementation of crc16 (CRC-16-CCITT) in python
def crc16(data: bytes, poly=0x8408):
'''
CRC-16-CCITT Algorithm
'''
data = bytearray(data)
crc = 0xFFFF
for b in data:
cur_byte = 0xFF & b
for _ in range(0, 8):
if (crc & 0x0001) ^ (cur_byte & 0x0001):
@oysstu
oysstu / LV2015-x64-debinst.sh
Last active November 2, 2015 09:35
Script to install LabVIEW2015 under linux mint
apt-get install alien
alien -d -k --scripts LABVIEW-2015-APPBUILD-1500.rpm
alien -d -k --scripts LABVIEW-2015-CORE-1500-1X8.rpm
alien -d -k --scripts LABVIEW-2015-DESKTOP-1500-.rpm
alien -d -k --scripts LABVIEW-2015-EXAMPLES-1500.rpm
alien -d -k --scripts LABVIEW-2015-EXE-1500-1X86.rpm
alien -d -k --scripts LABVIEW-2015-HELP-1500-1X8.rpm
alien -d -k --scripts LABVIEW-2015-PRO-1500-1X86.rpm
alien -d -k --scripts LABVIEW-2015-REF-1500-1X86.rpm