This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
package main | |
import ( | |
"fmt" | |
"runtime" | |
"time" | |
"sync" | |
) | |
func main() { |
v=`curl -s https://s3.amazonaws.com/download.draios.com/stable/install-sysdig`; if [ "7777a6bb3188993fc70fd8124c03e2880f034be6 -" != "`echo -n "$v" | sha1sum`" ]; then echo "invalid hash"; else `echo "$v" | sudo bash`; fi |
../../extras/package/macosx/../../../modules/codec/avcodec/fourcc.c:448:23: error: use of undeclared identifier 'AV_CODEC_ID_OPUS' | |
{ VLC_CODEC_OPUS, AV_CODEC_ID_OPUS, AUDIO_ES }, | |
^ | |
../../extras/package/macosx/../../../modules/codec/avcodec/fourcc.c:487:43: error: invalid application of 'sizeof' to an incomplete type 'const struct <anonymous struct at | |
../../extras/package/macosx/../../../modules/codec/avcodec/fourcc.c:39:14> []' | |
static const size_t codecs_count = sizeof (codecs_table) | |
^~~~~~~~~~~~~~ | |
2 errors generated. | |
make[4]: *** [codec/avcodec/libavcodec_plugin_la-fourcc.lo] Error 1 | |
make[4]: *** Waiting for unfinished jobs.... |
use std::io; | |
pub struct A<'a, R> { | |
reader: &'a R | |
} | |
pub fn init<'a, R: io::Reader>(r: &'a R) -> ~Parser<'a, R> { | |
~A { | |
reader: r | |
} |
extern mod native; | |
use std::io::net::unix::UnixStream; | |
use std::path::posix::Path; | |
use std::str; | |
use std::rt::rtio::IoFactory; | |
use native::io; | |
fn main() { |
# Threat model | |
## Attacker categories | |
### Security adversary | |
Wants to read messages he is not supposed to. | |
able to control communication channels and read/modify packets | |
### Consensus adversary |
use std::rt::io::File; | |
use std::rt::io::buffered::BufferedReader; | |
[...] | |
let s:~str = ~"file.txt"; | |
let mut strings:~[~str] = ~[]; | |
let path = PosixPath::new(s); | |
let mut rdr = BufferedReader::new(File::open(&path).unwrap()); |
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(100); |
#define STR(x) #x | |
#define STR1(x) STR(x) | |
#define DEBUGME(a) OutputDebugStringA( "[DEBUG| " __FUNCTION__ ":" STR1(__LINE__) "] " a "\n") |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer