Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

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 \

Keybase proof

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:

https://github.com/lord/slate
https://apiblueprint.org/
http://swagger.io/
http://raml.org/
@zokier
zokier / 2048.py
Last active August 29, 2015 14:17 — forked from justecorruptio/2048.py
import os
import tty
tty.setcbreak(0)
M = [''] * 16
def G(v):
p = [''] * 4
u = list(filter(str, v))
i = 3
ubuntu@ip-10-74-149-134:~$ mkdir rust-buildbox
ubuntu@ip-10-74-149-134:~$ cd rust-buildbox/
ubuntu@ip-10-74-149-134:~/rust-buildbox$ vim Dockerfile
ubuntu@ip-10-74-149-134:~/rust-buildbox$ docker build -t rust-buildbox .
ubuntu@ip-10-74-149-134:~/rust-buildbox$ docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
rust-buildbox latest be231641cce2 18 seconds ago 1.277 GB
ubuntu 14.04 c4ff7513909d 11 days ago 213 MB
ubuntu@ip-10-74-149-134:~/rust-buildbox$ docker run -t -i rust-buildbox /bin/bash
root@45ac8578f983:/# cd /home/rust/
@zokier
zokier / bitmatch.rs
Created August 11, 2014 18:37
Rust bitlevel pattern matching
#![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;
strict graph {
subgraph "South America" {
CL -- BR;
CL -- PE;
CO -- CL;
CO -- BR;
CO -- VE;
CO -- PE;
CO -- EC;
BR -- PE;
$ cargo-lite install --git https://github.com/bjz/cgmath-rs.git
note: Inferred pkgname cgmath-rs from path https://github.com/bjz/cgmath-rs.git
Traceback (most recent call last):
File "/tmp/cargo-lite/bin/cargo-lite", line 587, in <module>
main(opts)
File "/tmp/cargo-lite/bin/cargo-lite", line 573, in main
pkg.install(args=rustcargs)
File "/tmp/cargo-lite/bin/cargo-lite", line 497, in install
force=force)
File "/tmp/cargo-lite/bin/cargo-lite", line 289, in install
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
extern mod openssl = "openssl";
extern mod extra;
use crypto = openssl::crypto::symm;
use extra::hex::FromHex;
#[test]
fn test_aes_zeroes_key() {
let key = "00000000000000000000000000000000".from_hex().unwrap();
let plaintext = "80000000000000000000000000000000".from_hex().unwrap();
let ciphertext = "3ad78e726c1ec02b7ebfe92b23d9ec34".from_hex().unwrap();