I hereby claim:
- I am zokier on github.
- I am zokier (https://keybase.io/zokier) on keybase.
- I have a public key ASBYCiXERvk4W2FAGPyfSSbGjWftTEoV8a7F101zJw_StQo
To claim this, I am signing this object:
FROM debian:stable-slim AS builder | |
RUN APT_FRONTEND=non-interactive apt-get update && apt-get install -y curl \ | |
&& curl -sSL -o /tmp/go.tar.gz https://go.dev/dl/go1.20.4.linux-amd64.tar.gz \ | |
&& tar -C /usr/local -xzf /tmp/go.tar.gz | |
ENV PATH $PATH:/usr/local/go/bin:/root/go/bin | |
ENV CGO_ENABLED 1 | |
RUN APT_FRONTEND=non-interactive apt-get install -y build-essential pkg-config clang \ | |
liblz4-dev zlib1g-dev libzstd-dev libdeflate-dev libpng-dev libgif-dev libbz2-dev \ |
#![feature(plugin_registrar)] | |
extern crate syntax; | |
extern crate rustc; | |
use syntax::ast; | |
use syntax::codemap::Span; | |
use syntax::ext::base; | |
use syntax::ext::base::{ExtCtxt, MacExpr}; | |
use syntax::ext::build::AstBuilder; | |
use syntax::parse::token; |
# this script calculates the use of modifier keys in different kb layouts | |
# kotoistus is Finnish keyboard layout (and for this purpose equivalent of Swedish layout) | |
# fi-intl is my custom layout, essentially US layout mixed with ö and ä letters | |
# us is basic US layout. | |
symbol_counts = { | |
#'a': 443776445, | |
#' ': 74199965, # ignore spaces for now | |
'_': 22890057, | |
',': 10895692, |
{ | |
"2013-01-01": [ | |
], | |
"2013-01-02": [ | |
"Aapeli" | |
], | |
"2013-01-03": [ | |
"Elmeri", | |
"Elmo", | |
"Elmer" |
I hereby claim:
To claim this, I am signing this object:
https://github.com/lord/slate | |
https://apiblueprint.org/ | |
http://swagger.io/ | |
http://raml.org/ |
fn is_printable_ascii(c: u8) -> bool { | |
c >= 0x20u8 && c < 0x7fu8 | |
} | |
fn main() { | |
// why temporary variable needed? | |
// error: borrowed value does not live long enough | |
let test_data: ~[u8] = std::io::File::open(&Path::new("test_data")).read_to_end(); | |
let _test_data_filtered: ~[u8] = test_data.iter() | |
// why double deref? |
extern mod extra; | |
use extra::base64::FromBase64; | |
#[test] | |
fn test_b64_1() { | |
let test_data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\n"; | |
match test_data.from_base64() { | |
Ok(s) => s, | |
Err(msg) => fail!(format!("Failed to read b64: {:s}", msg.escape_default())) | |
}; |
#[feature(macro_rules)]; | |
macro_rules! enum_fmt( | |
($name:ident { $($member:ident),+ }) => ( | |
enum $name { | |
$( | |
$member, | |
)+ | |
} | |
impl std::fmt::Default for $name { |