This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int counter = 0; | |
typedef RWLock { | |
chan writeComplete = [0] of {bit}; | |
chan allowWrite = [0] of {bit}; | |
int readers; | |
bit writing; | |
int writeWaiters; | |
int readWaiters | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NOTE that in order to use this you'll have to tell your TLA+ model checker about the | |
values of DirAuthNodes and Relays, for example: | |
DirAuthNodes <- {"n1","n2","n3","n4","n5"} | |
Relays <- {"r1", "r2", "r3", "r4", "r5"} | |
------------------------------ MODULE dirauth ------------------------------ | |
EXTENDS Naturals, Sequences, TLC, FiniteSets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/default/ufw | |
# | |
# Set to yes to apply rules to support IPv6 (no means only IPv6 on loopback | |
# accepted). You will need to 'disable' and then 'enable' the firewall for | |
# the changes to take affect. | |
IPV6=yes | |
# Set the default input policy to ACCEPT, ACCEPT_NO_TRACK, DROP, or REJECT. | |
# ACCEPT enables connection tracking for NEW inbound packets on the INPUT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# rules.before | |
# | |
# Rules that should be run before the ufw command line added rules. Custom | |
# rules should be added to one of these chains: | |
# ufw-before-input | |
# ufw-before-output | |
# ufw-before-forward | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rebuttal of "[36C3] The ecosystem is moving" | |
============================================ | |
abstract | |
-------- | |
Moxie is wrong about a lot of things in this talk. Here I'll discuss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"flag" | |
"fmt" | |
"io" | |
"os" | |
"sort" | |
"strconv" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"fmt" | |
) | |
func isAlmost(x, y []byte) bool { | |
skipped := false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[UpstreamProxy] | |
Type = "socks5" | |
Network = "tcp" | |
Address = "127.0.0.1:9050" | |
[Logging] | |
Disable = false | |
Level = "DEBUG" | |
File = "/home/user/catshadow_testnet/bob/catshadow.log" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate hyper; | |
extern crate hyperlocal; | |
use std::os::unix::net::UnixListener; | |
use hyper::{Response, rt::{Future, Stream}, service::service_fn}; | |
use hyperlocal::server::{Http, Incoming}; | |
fn main () { | |
if let Err(err) = std::fs::remove_file("hyperlocal_test_echo_server_2.sock") { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::thread; | |
use std::os::unix::net::{UnixStream, UnixListener}; | |
fn handle_client(stream: UnixStream) { | |
// ... | |
} |
NewerOlder