Skip to content

Instantly share code, notes, and snippets.

View matthewaveryusa's full-sized avatar

Matthew Avery matthewaveryusa

  • United States
View GitHub Profile
@matthewaveryusa
matthewaveryusa / keybase.md
Created November 19, 2015 00:39
keybase.md

Keybase proof

I hereby claim:

  • I am matthewaveryusa on github.
  • I am matthewaveryusa (https://keybase.io/matthewaveryusa) on keybase.
  • I have a public key is ASCGRjxUccGVpoKfhNyg91poMOM0jxT3-Sq_57R9LIY03Qo

To claim this, I am signing this object:

#include <algorithm>
#include <string>
#include <vector>
#include <cstring>
#include <string>
#include <fstream>
#include <streambuf>
#include <iostream>
#include <ctime>
@matthewaveryusa
matthewaveryusa / grab_io_kbm.c
Created May 20, 2016 03:13
linux grab io from keyboard and mouse
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <linux/input.h>
#include <time.h>
#include <stdint.h>
int main(int argc, char* argv[]){
sleep(1);
@matthewaveryusa
matthewaveryusa / threads.cpp
Last active March 8, 2017 06:27
1 thread per connection
//g++ -std=c++11 threads.cpp picohttpparser.c -march=native -pthread -O3 -o threads
//requires picohttpparser.{c,h} from https://github.com/h2o/picohttpparser
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <netdb.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
screen /dev/tty...
export TERM=ansi
nmtui
cd /tmp
wget http://www.raspibo.org/renzo/chiplinux4.3.0rd235+.tgz
cd /
sudo tar zxf /tmp/chiplinux4.3.0rd235+.tgz
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJr39o0k2uCPLDv97zXntULFvgac2l6oFMPbyGklPbAz bootstrap@bootstrap