Skip to content

Instantly share code, notes, and snippets.

View JIghtuse's full-sized avatar

Boris Egorov JIghtuse

View GitHub Profile
@JIghtuse
JIghtuse / playground.rs
Created October 6, 2015 08:12 — forked from anonymous/playground.rs
Shared via Rust Playground
use std::str::FromStr;
#[derive(Debug)]
enum Version { Version1, Version2 }
#[derive(Debug)]
enum ParseError { InvalidSyntax, UnsupportedVersion }
struct NameValue {
name: String,
@JIghtuse
JIghtuse / playground.rs
Created October 6, 2015 07:35 — forked from anonymous/playground.rs
Shared via Rust Playground
use std::str::FromStr;
#[derive(Debug)]
enum Version { Version1, Version2 }
#[derive(Debug)]
enum ParseError { InvalidSyntax, UnsupportedVersion }
fn parse_version(line: String) -> Result<Version, ParseError> {
let mut split = line.split("=");
@JIghtuse
JIghtuse / gist:7340984e80d49f1d4935
Created September 29, 2015 11:09 — forked from jayjanssen/gist:5697813
Testing multicast with iperf
this is a sample of output:
root@percona-db-2:~# iperf -s -u -B 226.94.1.1 -i 1
------------------------------------------------------------
Server listening on UDP port 5001
Binding to local address 226.94.1.1
Joining multicast group 226.94.1.1
Receiving 1470 byte datagrams
UDP buffer size: 122 KByte (default)
------------------------------------------------------------
me:
@true
a:
@true
sandwich:
@[ "$$(id -u)" -eq 0 ] && echo "Okay." || echo "What? Make it yourself."
.PHONY: me a sandwich

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
" copy all this into a vim buffer, save it, then...
" source the file by typing :so %
" Now the vim buffer acts like a specialized application for mastering vim
" There are two queues, Study and Known. Depending how confident you feel
" about the item you are currently learning, you can move it down several
" positions, all the way to the end of the Study queue, or to the Known
" queue.
" type ,, (that's comma comma)
{"Archimedean spiral",
"Archimedes’ spiral",
"astroid",
"astroid pedal curve",
"bifoliate",
"bifolium",
"butterfly catastrophe curve",
"second butterfly curve",
"cardioid",
"cardioid pedal curve",