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
rust-try: | |
#!/bin/bash | |
git diff --quiet HEAD | |
if [[ "$?" != "0" ]]; then | |
echo "Cannot push to try with uncommitted changes." | |
exit 1 | |
fi | |
git push -f mozilla HEAD:try |
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 std; | |
use std::base64::ToBase64; | |
use core::str::Clone; | |
fn hex_to_base64(source: &str) -> ~str { | |
let bytes = str::to_bytes(source); | |
let mut nums: ~[u8] = ~[]; | |
for uint::range_step(0, bytes.len(), 2) |i| { | |
let num = u8::parse_bytes(bytes.slice(i, i+2), 16); |