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::mem::{self, MaybeUninit}; | |
/// This is a stable alternative implementation of array_try_map | |
/// | |
/// TODO: remove this when array_try_map is stabilized | |
/// | |
/// This follows the example of MaybeUninit usage | |
/// https://doc.rust-lang.org/std/mem/union.MaybeUninit.html#initializing-an-array-element-by-element | |
pub fn try_map<T, R, E, const N: usize, F>(source: [T; N], mut cb: F) -> Result<[R; N], E> | |
where |
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
package net.arhipov | |
import com.sun.net.httpserver.Headers | |
import com.sun.net.httpserver.HttpServer | |
import java.net.InetSocketAddress | |
import java.net.URI | |
import java.util.Collections.synchronizedList | |
class MockHttpServer( | |
port: Int = 0 |
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/env bash | |
function filter { | |
while read line; do | |
if [ "$($1 $line)" -ne 0 ]; then | |
echo $line | |
fi | |
done | |
} |
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
Шел как–то еще не просветленный монах, не достигший дао и не похуист по жизни, задумался о смысле бытия, и тут ему дорогу перегородило говно. И сказало: | |
— Я тебя съем! | |
Упал монах на колени и зарыдал. И говно его съело. | |
Мораль: Даже в самых дерьмовых ситуациях не нужно опускать руки и рыдать. | |
Шел как–то еще не просветленный монах, не достигший дао но похуист по жизни, задумался о смысле бытия, и тут ему дорогу перегородило говно. И сказало: | |
— Я тебя съем! | |
А он ответил: | |
— Нет, не съешь! | |
А говно его съело. |