Skip to content

Instantly share code, notes, and snippets.

View dikshant's full-sized avatar

Dikshant Adhikari dikshant

  • CockroachLabs
  • New York City
View GitHub Profile
# example reading two serial devices using pyserial, asyncio and coroutines
import serial_asyncio
import asyncio
@asyncio.coroutine
def serial_read(device, **kwargs):
reader, writer = yield from serial_asyncio.open_serial_connection(url=device, **kwargs)
while True:
line = yield from reader.readline()
@sdorra
sdorra / keys.go
Created April 17, 2016 19:31
Golang RSA Key Generation
/*
* Genarate rsa keys.
*/
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 7, 2024 06:03
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname