Skip to content

Instantly share code, notes, and snippets.

@bad1dea
bad1dea / ComPort over Network.md
Created October 1, 2018 02:35 — forked from DraTeots/ComPort over Network.md
ComPort over Network

Connecting to serial port (com port) over network

(Serial port or com port? - Serial ports are often refered as COM ports. It is the same to be short. You can read abut it in the Wiki article )


## The problem Suppose we have an application that works with some device using serial port (com port). It could be GPS reader, IRDA, whatever. So it looks like this:
@bad1dea
bad1dea / re2
Last active March 11, 2019 21:00
credits to CJBok
00000001:Handgun - Matilda
00000002:Handgun - M19
00000003:Handgun - JMB Hp3
00000004:Handgun - Quickdraw Army Revolver
00000007:Handgun - MUP
00000008:Handgun - Broom Hc
00000009:Handgun - SLS 60
0000000B:Shotgun - W-870
FFFFFFFF:not weapon
00000001:Handgun - Matilda:0000000F:0000000C
00000002:Handgun - M19:0000001A:00000007
00000003:Handgun - JMB Hp3:0000000F:0000000D
00000004:Handgun - Quickdraw Army Revolver:0000001A:00000006
00000007:Handgun - MUP:0000000F:00000010
00000008:Handgun - Broom Hc:0000000F:00000009
00000009:Handgun - SLS 60:0000000F:00000005
0000000B:Shotgun - W-870:00000010:00000004
00000015:Sub Gun - MQ 11:00000011:00000018
00000000:is weapon
00000001:First Aid Spray
00000002:Green Herb
00000003:Red Herb
00000004:Blue Herb
00000005:Mixed Herb (G+G)
00000006:Mixed Herb (G+R)
00000007:Mixed Herb (G+B)
00000008:Mixed Herb (G+G+B)
00000009:Mixed Herb (G+G+G)
@bad1dea
bad1dea / plex-update-mtime.py
Created April 18, 2019 07:16 — forked from tadly/plex-update-mtime.py
Retroactively update plex's updated_at, created_at and added_at dates by the files mtime
#!/usr/bin/env python3
#
# Most importantly:
# 1. Use at your own risk!
# 2. You may consider creating a backup because this script doesn't
# 3. Only tested on linux
#
# What does this script do?
# Whenever you scan for new items, plex will set the respective dates to
# the CURRENT time rather than the files mtime.
@bad1dea
bad1dea / Steps to Obtain Client Secret.md
Created February 3, 2020 19:14 — forked from darthShadow/Steps to Obtain Client Secret.md
Mega Account Creator. Handles registration using megareg. Handles verification using Google Client API.
  1. Use this wizard to create or select a project in the Google Developers Console and automatically turn on the API. Click Continue, then Go to credentials.
  2. On the Add credentials to your project page, click the Cancel button.
  3. At the top of the page, select the OAuth consent screen tab. Select an Email address, enter a Product name (Mega Account Creator) if not already set, and click the Save button.
  4. Select the Credentials tab, click the Create credentials button and select OAuth client ID.
  5. Select the application type Other, enter the name "Mega Account Creator", and click the Create button.
  6. Click OK to dismiss the resulting dialog.
  7. Click the Download JSON button to the right of the client ID.
  8. Move this file to your working directory and rename it client_secret.json.