Skip to content

Instantly share code, notes, and snippets.

View kmfarley11's full-sized avatar

Kevin kmfarley11

View GitHub Profile
@kmfarley11
kmfarley11 / keybase.md
Created May 5, 2021 18:32
Key base proof

Keybase proof

I hereby claim:

  • I am kmfarley11 on github.
  • I am kmfarley11 (https://keybase.io/kmfarley11) on keybase.
  • I have a public key ASDUX1MGCW87FtErgBVUIkKpSPBTdf4kL4T0x22A3P5UWAo

To claim this, I am signing this object:

//
// Simple bit stuffing and framing prototype for HDLC implementations
//
// Needs c++ for i/o as-is, but its really a C-based implementation
//
// This is a quick and dirty solution, if flow control or synchronous
// behavior is necessary, look into using other libs..
//
// note: needs crc still, basically I just wanted to make a quick and
// droppable implementation of bit stuffing
@kmfarley11
kmfarley11 / duple.md
Last active January 28, 2020 02:52
Byte Repeater: duplicate some number of bytes in an input buffer some number of times and store in an output buffer

Byte Repeater


duplicate some number of bytes in chunks from an input buffer to an output buffer

Contents:

  • python prototype (python3)
  • sequential implementation (cpp)
  • parallel implementation (cuda)
  • makefile example (mingw32-make)
  • example output (powershell)
@kmfarley11
kmfarley11 / do_sync.sh
Created January 18, 2020 21:22
Simple File Sync Using SCP
#!/bin/bash
# A very simple script (function) to enable file syncing given a server IP running (open)sshd
#
# rsync is probably a better option... but if you cant, ssh/scp is pretty straightforward
#
# to setup (open)sshd on windows 10 refer to https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse
# to setup (open)sshd on linux / mac refer to your package manager (i.e. apt-get install openssh-server)
#
# This script makes a few assumptions, if you just source this file (source do_sync.sh) then execute "do_sync" to see usage
# NOTE: you need to set the following environment variables: SYNC_HOST and SYNC_USER