Skip to content

Instantly share code, notes, and snippets.

#[macro_use]
extern crate slog;
extern crate slog_term;
use slog::DrainExt;
#[derive(Debug)]
enum Topic {
First,
Second,
@caipre
caipre / setup.sh
Last active October 10, 2016 01:16
#!/bin/sh
set -e
export PREFIX="$HOME/.local/cross"
export TARGET=x86_64-pc-elf
export PATH="$PREFIX/bin:/usr/local/bin:/usr/bin:/bin"
BUILDDIR=$HOME/.local/build
SOURCEDIR=$HOME/.local/src
fn score(hex: &[u8]) -> u8 {
let mut freq = HashMap::new();
for byte in hex {
match freq.get(&byte) {
Some(count) => freq.insert(byte, *count + 1),
None => freq.insert(byte, 1)
};
}
0
}
@caipre
caipre / gist:feb7f9fe46dc2fa90a79
Created February 19, 2015 21:48
hussar: static analysis of wordpress
# commit: 5dc3b77be39b499c1e9b6b757256a9aec86d80d8
# created: 2015-02-19 16:43:36
14 UseUndeclaredGlobalVariable wp-admin/edit-form-comment.php $comment
19 UseUndeclaredGlobalVariable wp-admin/edit-form-comment.php $user_ID
109 UseUndeclaredGlobalVariable wp-admin/edit-form-comment.php $action
20 UseUndeclaredGlobalVariable wp-admin/edit-tag-form.php $taxonomy
29 UseUndeclaredGlobalVariable wp-admin/edit-tag-form.php $tag
65 UseUndeclaredGlobalVariable wp-admin/edit-tag-form.php $tax
587 UseUndeclaredVariable wp-admin/includes/class-ftp.php $rest
@caipre
caipre / gist:c38f1b428bfb9c6bac2d
Created February 7, 2015 18:49
keybase proof

Keybase proof

I hereby claim:

  • I am caipre on github.
  • I am caipre (https://keybase.io/caipre) on keybase.
  • I have a public key whose fingerprint is 4CA8 A480 4465 5AC1 90CD 08EF 70DE 05AE 7A63 2BC6

To claim this, I am signing this object: