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
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(); |
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
$ 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 |
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
strict graph { | |
subgraph "South America" { | |
CL -- BR; | |
CL -- PE; | |
CO -- CL; | |
CO -- BR; | |
CO -- VE; | |
CO -- PE; | |
CO -- EC; | |
BR -- PE; |
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
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/ |
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
import os | |
import tty | |
tty.setcbreak(0) | |
M = [''] * 16 | |
def G(v): | |
p = [''] * 4 | |
u = list(filter(str, v)) | |
i = 3 |
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
use std; | |
#[link( | |
name="rust_hello", | |
vers="0.1", | |
author = "zokier", | |
url="http://github.com/zokier/rust_hello", | |
uuid="6240d465-7dba-4aa8-9053-027a1b12ecc4" | |
)]; |
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
import pygame, time, random, sys, copy, os | |
from pygame.locals import * | |
t2 = 0 | |
nor = 0 | |
pc = [[[1, 1], [1, 1]], [[1, 0], [1, 0], [1, 1]], [[0, 1], [0, 1], [1, 1]], [[1], [1], [1], [1]], [[0, 1, 1], [1, 1, 0]], [[1, 1, 0], [0, 1, 1]], [[1, 1, 1], [0, 1, 0]]] | |
cols = [(0, 0, 0), (100, 100, 100), (10, 100, 225), (0, 150, 220), (0, 220, 150), (60, 200, 10), (180, 210, 5), (210, 180, 10), (100, 200, 170)] | |
pygame.init() | |
pygame.display.set_mode((320, 240)) | |
sk = pygame.display.get_surface() | |
f = [[1] + [0 for x in range(8)] + [1] for x in range(19)] + [[1 for x in range(10)]] |
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
#!/usr/bin/ruby | |
require 'socket' | |
require "base64" | |
require "open3" | |
server = "localhost" | |
port = "6667" | |
nick = "Nickname#{rand(5000)}" | |
channel = "#channel" |
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> | |
int main(int, char**) | |
{ | |
if (4294967296 != 4294967296LL) | |
puts("Literal overflows"); | |
else | |
puts("Literal does not overflow"); | |
} | |
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
void (*yesno_cb)(bool); | |
void yn_tavern_room(bool b) | |
{ | |
if (b) | |
set_player_location(&loc_room_offline); | |
else | |
set_player_location(&loc_tavern_bartender); | |
} |
OlderNewer