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 | |
# Reproduce https://bugzilla.kernel.org/show_bug.cgi?id=58691 | |
# Depends: sshd listening :22, ssh, unshare, setkey(ipsec-tools), iproute2, ip6_tunnel.ko, veth, radvd | |
modprobe ip6_tunnel | |
export MYPID=$$ | |
rm /tmp/unshare_pid |
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
#include <stdio.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <sys/types.h> | |
#include <string.h> | |
#ifndef WIN32 | |
#include <netdb.h> | |
#include <sys/socket.h> |
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
/* automatically generated by rust-bindgen */ | |
// sources: https://raw.github.com/vi/forsnapshotfs/master/simplecow.h https://raw.github.com/vi/forsnapshotfs/master/simplecow.c | |
use std::libc::*; | |
//pub type backing_read_t = *u8; | |
pub type Struct_simplecow = c_void; | |
#[link_args = "-lsimplecow"] |
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
$ curl -v -H 'Authorization: token <skipped>' -H "Accept: application/vnd.github.manifold-preview" -H "Content-Type: application/zip" --data-binary @virtual_touchscreen.jar "https://uploads.github.com/repos/vi/virtual_touchscreen/releases/54927/assets?name=virtual_touchscreen.jar" | |
* About to connect() to uploads.github.com port 443 (#0) | |
* Trying 192.30.252.97... | |
* connected | |
* Connected to uploads.github.com (192.30.252.97) port 443 (#0) | |
* successfully set certificate verify locations: | |
* CAfile: none | |
CApath: /etc/ssl/certs | |
* SSLv3, TLS handshake, Client hello (1): | |
* SSLv3, TLS handshake, Server hello (2): |
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
/* vethify - multiplex packets between two ethernet interfaces | |
Permission is hereby granted, free of charge, to any person obtaining a | |
copy of this software and associated documentation files (the "Software"), | |
to deal in the Software without restriction, including without limitation | |
the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
and/or sell copies of the Software, and to permit persons to whom the | |
Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in |
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
#include <arpa/inet.h> | |
#include <netinet/in.h> | |
#include <netinet/in.h> | |
#include <stdio.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/select.h> |
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 | |
COMPRESSOR="xz --lzma2=dict=" | |
OVERHEAD=60 | |
if [ -z "$2" ]; then | |
echo "Usage: filedistance file1 file2" | |
echo " Outputs similarity metric using between two small files using compression" | |
echo " 0 - completely similar; 1 - completely dissimilar" | |
exit 1 |
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
trait Drawable { fn draw(&self); } | |
trait VeryDrawable : Drawable + Clone { fn draw_twice(&self) { self.draw(); self.draw(); } } | |
#[deriving(Eq, Clone)] | |
enum Circle { Circle } | |
#[deriving(Eq, Clone)] | |
struct Rectangle; | |
impl Drawable for Circle { fn draw(&self) { println("C"); } } | |
impl Drawable for Rectangle { fn draw(&self) { println("R"); } } |
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
#wget 'http://127.0.0.1:7657/viewstat.jsp?stat=tunnel.participatingTunnels&showEvents=false&period=60000&periodCount=1500&end=1744&width=2400&height=600' -O 2014-03-01.png | |
INITIAL_DAY=2014-01-28 | |
WIDTH=1200 | |
HEIGHT=600 | |
ADDR=http://127.0.0.1:7657 | |
DATE_NOW=$(date -u +'%Y-%m-%d') |
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 | |
set -e | |
if [ -z "$2" ]; then | |
echo "Script to set up router advertising proxy for one peer" | |
echo "Usage: setup_ipv6_hacky_router UPLINK DOWNLIK" | |
echo "Example: setup_ipv6_hacky_router eth0 wlan0" | |
exit 1 | |
fi |