Skip to content

Instantly share code, notes, and snippets.

View elyzion's full-sized avatar

Berthold Alheit elyzion

View GitHub Profile
@elyzion
elyzion / Trouble shooting
Created March 5, 2019 02:24
Kubernetes notes
Spin up a quick shell with network-utils.
```k run tmp-shell --rm -i --tty --image amouat/network-utils -- /bin/bash```
#Non-align
def foo
some_function(true, { :before => 1,
:after => 2 })
end
def bar
case @var
when 1
print 'a'
#!/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
//! 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.
@elyzion
elyzion / echo.rs
Last active August 29, 2015 13:56
A very simple echo server.
//! 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;