The code below (data encoded in Go) and then decoded in Rust. works fine.
extern crate rmp_serde as rmps;
extern crate serde;
#[macro_use]
extern crate serde_derive;| struct Cache {} | |
| impl Cache { | |
| fn new() -> Cache { | |
| Cache {} | |
| } | |
| fn get(&mut self, key: &u32) -> Option<&str> { | |
| None | |
| } |
| #SET TO DESTINATION IP | |
| DEST_IP='172.17.0.1' | |
| #CHANGE IF NECESSARY (the dest ip should be reachable from eth0) | |
| DEV=eth0 | |
| dmesg -n 7 | |
| modprobe configfs |
| #!/bin/bash | |
| if [ $# != 2 ] ; then | |
| echo "usage $0 PATH_TO_BINARY TARGET_FOLDER" | |
| exit 1 | |
| fi | |
| PATH_TO_BINARY="$1" | |
| TARGET_FOLDER="$2" |
| #!/bin/bash | |
| set -e | |
| function error { | |
| echo -e $* >&2 | |
| } | |
| OPTS=`getopt -o hd:p: -l help,dist:,password:,jwt: -- "$@"` | |
| if [ $? != 0 ] ; then error "Failed parsing options." ; exit 1 ; fi |
| package main | |
| import ( | |
| "fmt" | |
| "github.com/siddontang/ledisdb/config" | |
| "github.com/siddontang/ledisdb/server" | |
| "gopkg.in/redis.v2" | |
| "math/rand" | |
| "time" | |
| ) |
| select mean("x") - mean("y") FROM | |
| (SELECT mean("value") as "x" FROM "series" WHERE $timeFilter GROUP BY time($__interval)), | |
| (SELECT mean("value") as "y" FROM "series" WHERE $timeFilter GROUP BY time($__interval)) | |
| WHERE $timeFilter group by time($__interval) fill(linear) |
| from i3pystatus import Status | |
| from i3pystatus.weather import Weather | |
| status = Status() | |
| # Displays clock like this: | |
| # Tue 30 Jul 11:59:46 PM KW31 | |
| # ^-- calendar week | |
| status.register("clock", | |
| format="%a %-d %b %X",) |
| # This file has been auto-generated by i3-config-wizard(1). | |
| # It will not be overwritten, so edit it as you like. | |
| # | |
| # Should you change your keyboard layout somewhen, delete | |
| # this file and re-run i3-config-wizard(1). | |
| # | |
| # i3 config file (v4) | |
| # | |
| # Please see http://i3wm.org/docs/userguide.html for a complete reference! |
| # vim: filetype=yaml | |
| --- | |
| meta: | |
| description: 'Solarized theme by lasers' | |
| colors: | |
| base03: '#002b36' | |
| base02: '#073642' | |
| base01: '#586e75' | |
| base00: '#657b83' | |
| base0: '#839496' |