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
//! A simplistic echo server that allows client to exit using the quit command. | |
#![crate_id = "echo:0.1pre"] | |
#![feature(phase)] | |
#[phase(plugin, link)] extern crate log; | |
use std::io::{Listener, Acceptor, BufferedStream}; | |
use std::io::net::tcp::TcpListener; |
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
//! A simplistic echo server that allows client to exit using the quit command. | |
//! Based on various examples and sources from the internet. | |
#[crate_id = "echo:0.1pre"]; | |
use std::io::{Listener, Acceptor, BufferedStream}; | |
use std::io::net::tcp::TcpListener; | |
use std::io::net::ip::{SocketAddr, Ipv4Addr}; | |
//FIXME: In general, need more error handling. |
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
#!/bin/bash | |
# chkconfig: 345 20 80 | |
# description: Play start/shutdown script | |
# processname: play | |
# | |
# Instalation: | |
# copy file to /etc/init.d | |
# chmod +x /etc/init.d/play | |
# chkconfig --add /etc/init.d/play | |
# chkconfig play on |
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
#Non-align | |
def foo | |
some_function(true, { :before => 1, | |
:after => 2 }) | |
end | |
def bar | |
case @var | |
when 1 | |
print 'a' |
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
Spin up a quick shell with network-utils. | |
```k run tmp-shell --rm -i --tty --image amouat/network-utils -- /bin/bash``` |