Skip to content

Instantly share code, notes, and snippets.

View kbknapp's full-sized avatar
🦀

Kevin K. kbknapp

🦀
View GitHub Profile

wasm32-unknown-unknown

Setup

  1. Use nightly with rustup
$ rustup update nightly
$ rustup target add wasm32-unknown-unknown --toolchain nightly 

Vim Cheat Sheet

CRITICAL

Key Function
esc Command Mode
i Insert Mode
v Visual (Select) Mode
: Enter Command
0x962D302480726f8344B03e0C91C42773B716871F
fn main() {
if let Err(e) = run(&matches) {
println!("error: {}", e);
process::exit(1);
}
}
fn run(matches: &ArgMatches) -> Result<(), &'static str> {
let mut sheet = handle_init(&matches, timesheet::Timesheet::load_from_file())?;
@kbknapp
kbknapp / diff_of_names.diff
Last active March 25, 2017 02:26
Well Documented Crates
--- rfc_top_20_percent 2017-03-24 22:19:42.912732177 -0400
+++ tokei_top_20_percent 2017-03-24 22:19:58.002619852 -0400
@@ -1,8 +1,11 @@
name
ForceFeedback-sys
+GenGen
Inflector
+RustyEmitter
+abc
+abomonation

Keybase proof

I hereby claim:

  • I am kbknapp on github.
  • I am kbknapp (https://keybase.io/kbknapp) on keybase.
  • I have a public key ASBwSggp-pKZaJ18W8BULA3HSBN-DlfQvBi0eUva-aJpkwo

To claim this, I am signing this object:

@kbknapp
kbknapp / stats.md
Last active February 9, 2016 21:44
@kbknapp
kbknapp / proj_stats.py
Last active February 9, 2016 21:45
gets simple project stats
#!/usr/bin/python3
import subprocess
import os
import os.path
import sys
crates_io_lic = '[![Crates.io License](https://img.shields.io/crates/l/{}.svg)]({})'
crates_io_dl = '[![Crates.io Downloads](https://img.shields.io/crates/d/{}.svg)]({})'
github_stars = '[![GitHub stars](https://img.shields.io/github/stars/{}/{}.svg?style=social&label=Stars)]({})'
@kbknapp
kbknapp / chain_macro
Last active August 29, 2015 14:15
Example method chaining macro
// credit to /u/tyoverby of reddit
macro_rules! chain(
($inp:expr; $(. $call:ident($($e:expr),*))*) => (
{
let mut tmp = $inp;
$(
tmp.$call($($e),*);
)*
tmp
}