Skip to content

Instantly share code, notes, and snippets.

View techsd's full-sized avatar
:octocat:
life is cool

Dmytro techsd

:octocat:
life is cool
View GitHub Profile
@maxp
maxp / NMEA_checksum
Created September 4, 2011 17:44
Calculating an NMEA Checksum (C#)
// Calculates the checksum for a sentence
// Calculates the checksum for a sentence
static string getChecksum(string sentence) {
//Start with first Item
int checksum= Convert.ToByte(sentence[sentence.IndexOf('$')+1]);
// Loop through all chars to get a checksum
for (int i=sentence.IndexOf('$')+2 ; i<sentence.IndexOf('*') ; i++){
// No. XOR the checksum with this character's value
checksum^=Convert.ToByte(sentence[i]);
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 19, 2024 20:54
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jeruyyap
jeruyyap / Matching Rijndael-128 in C#.NET, PHP, and Python
Last active March 18, 2024 07:05
Matching Encrypt/Decrypt Methods With Rijndael-128, CBC Mode, PKCS7 Padding in C#.NET, PHP, And Python
DO NOT use these as-is for anything important!
These are only very basic examples and they are missing much of what would be needed for a real-world use case.
These are snippets for matching encrypt and decrypt (Rijndael-128 in CBC mode with PKCS7 padding) in C#.NET, PHP, and Python.
I cobbled these together from various existing examples because at the time it seemed like a lot of existing examples out there for different languages/platforms did not quite match and would require quite a bit more work before they would encrypt/decrypt identically.
Each of these take Keys and IVs that are 16 character strings encoded in base64.
@fboris
fboris / stm_native_bootloader.md
Last active June 25, 2024 11:22
dfu-util command for uploading firmware on ST devices
  1. Let device to enter dfu-mode. And use dfu-util to get available devices

sudo dfu-util -l

It will show like...

Found DFU: [0483:df11] ver=2100, devnum=32, cfg=1, intf=0, alt=3, name="@Device Feature/0xFFFF0000/01*004 g", serial="3262355B3231"
Found DFU: [0483:df11] ver=2100, devnum=32, cfg=1, intf=0, alt=2, name="@OTP Memory /0x1FFF7800/01*512 g,01*016 g", serial="3262355B3231"
Found DFU: [0483:df11] ver=2100, devnum=32, cfg=1, intf=0, alt=1, name="@Option Bytes  /0x1FFFC000/01*016 g", serial="3262355B3231"
@Bekbolatov
Bekbolatov / tmux.md
Last active May 11, 2024 15:12
Clean tmux cheat-sheet

Clean tmux cheat-sheet

By resources

sessions

list-sessions        ls         -- List sessions managed by server
new-session          new        -- Create a new session
sudo cp /etc/network/interfaces /etc/network/interfacesoriginal
sudp rm /etc/network/interfaces
sudo nano /etc/network/interfaces
----------------------------------
COPY
----------------------------------
auto lo
iface lo inet loopback
auto eth0
@casimir
casimir / 1_output.md
Last active September 3, 2023 08:35
AES-256 examples

Informations

cipher key: 0123456789abcdef0123456789abcdef
IV: 0123456789ABCDEF
padding character: fs (ASCII=34 -> FILE SEPARATOR)

Expected output

secret message: this information is confidential, for your eyes only
@realsba
realsba / palindrom2.cpp
Created May 17, 2018 12:43
Find all palindromes made from the product of two 4-digit numbers
#include <iostream>
#include <iomanip>
#include <unordered_set>
#include <vector>
#include <fstream>
using Type = uint32_t;
using Magic = std::vector<Type>;
using Numbers = std::unordered_set<Type>;
@dole7890
dole7890 / GSoC2018_BDS_Navigation_Report.md
Last active May 31, 2023 15:05
Expanding the Receiver to BEIDOU B2a

Overview

This document provides a description of the work developed for GNSS-SDR during the Google Summer of Code (GSoC) 2018 program. The main objective of this project is to extend the capabilities of the GNSS-SDR software by providing an implementation of BeiDou B2a signals. Specifically, this project will be focusing on the telemetry decoding, and processing of observables and position, velocity, and time (PVT) components of the receiver, and will be merged with the acquisition and tracking portion of the receiver to provide a fully functional BeiDou B2a receiver.

Team

Team Member Function
Dong Kyeong Lee Developer
Damian Miralles Mentor
Antonio Ramos de Torres Mentor
@FrangaL
FrangaL / kali-archive-keyring.sh
Last active February 24, 2024 13:03
Download the Kali archive keyring
#!/bin/bash
set -e
## Alternative 1
# Key server
alternative1() {
KEY_SRV=${KEY_SRV:-"keyserver.ubuntu.com"}
#GPG_KEY="7D8D0BF6"
GPG_KEY="ED444FF07D8D0BF6"