This file contains hidden or 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
| config.vm.provision 'sync-clock', type: 'shell', path: 'sync-clock.sh', run: 'always' |
This file contains hidden or 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 crate unicode_segmentation; | |
| extern crate unicode_normalization; | |
| use unicode_segmentation::UnicodeSegmentation; | |
| use unicode_normalization::UnicodeNormalization; | |
| fn main() { | |
| let noel = "noe\u{0308}l"; | |
| println!("Input: {}", noel); | |
| println!("Naively reversed: {}", naive_reverse(noel)); | |
| println!("Graphemes reversed: {}", grapheme_reverse(noel)); |
This file contains hidden or 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
| FROM ubuntu:16.04 | |
| RUN apt-get update && apt-get install -y g++ \ | |
| make \ | |
| libboost-all-dev \ | |
| libev-dev \ | |
| libmysqlclient-dev \ | |
| libmysql++-dev | |
| COPY ocelot ocelot/ | |
| WORKDIR ocelot | |
| RUN ./configure --with-boost-libdir=/usr/lib/x86_64-linux-gnu --with-ev-lib=/usr/lib/x86_64-linux-gnu --with-mysql-lib=/usr/lib/x86_64-linux-gnu |
This file contains hidden or 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
| let listener = TcpListener::bind("0.0.0.0:80"); | |
| let listener = match listener { | |
| Ok(r) => r, | |
| Err(_) => std::process::exit(1), | |
| }; | |
| unsafe { | |
| libc::setgid(501); | |
| libc::setuid(501); |
This file contains hidden or 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
| #!/bin/bash | |
| set -eu | |
| check_char='\xE2\x9C\x93' | |
| cross_char='\xE2\x9D\x8C' | |
| green='\033[0;32m' | |
| nc='\033[0m' | |
| check="$green$check_char$nc" | |
| cross="$green$cross_char$nc" | |
| errors=0 |
This file contains hidden or 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
| set -eux | |
| rm -r ../cargo-out/* | |
| ./bootstrap.py --crate-index=/home/zofrex/crates --target-dir=/home/zofrex/cargo-out --no-clone --no-clean --target x86_64-unknown-openbsd --download || true | |
| sed -i"" -e 's/\(\[\[test\]\]\) /\1\ | |
| /' ../cargo-out/url-0.5.9/Cargo.toml | |
| sed -i -e 's/^\(miniz-sys.*\), optional = true/\1/' ../cargo-out/flate2-0.2.13/Cargo.toml |
This file contains hidden or 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
| set -eux | |
| ./bootstrap.py --crate-index=/home/zofrex/crates --target-dir=/home/zofrex/cargo-out --no-clone --no-clean --target x86_64-unknown-openbsd --download || true | |
| sed -i"" -e 's/\(\[\[test\]\]\) /\1\ | |
| /' ../cargo-out/url-0.5.9/Cargo.toml | |
| sed -i -e 's/^\(miniz-sys.*\), optional = true/\1/' ../cargo-out/flate2-0.2.13/Cargo.toml | |
| ./bootstrap.py --crate-index=/home/zofrex/crates --target-dir=/home/zofrex/cargo-out --no-clone --no-clean --target x86_64-unknown-openbsd --download |
This file contains hidden or 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
| # which rustc | |
| which: rustc: Command not found. | |
| # ./rustc-1.8.0/x86_64-unknown-openbsd/stage2/bin/rustc test.rs | |
| ./rustc-1.8.0/x86_64-unknown-openbsd/stage2/bin/rustc: can't load library 'libstd-db5a760f.so' | |
| # cd rustc-1.8.0 | |
| # gmake install | |
| . . . the usual, full output below ... | |
| # which rustc | |
| /usr/local/bin/rustc | |
| # cd .. |
This file contains hidden or 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
| proc is_admin { | |
| user_id | |
| } { | |
| switch $user_id { | |
| 1 - | |
| 3 - | |
| 5 { return true } | |
| default { return false } | |
| } | |
| } |
This file contains hidden or 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
| rename if if_old | |
| proc if { | |
| condition | |
| block | |
| } { | |
| if_old {! [expr $condition]} { | |
| uplevel 1 $block | |
| } | |
| } |
NewerOlder