^\
foo
🤦♂️
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 t | |
Compiling hdrhistogram v6.1.1 | |
Compiling crossbeam-deque v0.7.1 | |
Compiling rand v0.6.5 | |
Compiling parking_lot v0.6.4 | |
Compiling hdrsample v6.0.3 | |
Compiling tower-spawn-ready v0.1.0 (/home/jon/dev/others/tower/tower-spawn-ready) | |
Compiling tower-limit v0.1.0 | |
Compiling tower-load v0.1.0 (/home/jon/dev/others/tower/tower-load) | |
error[E0277]: the trait bound `tokio_sync::oneshot::error::RecvError: std::error::Error` is not satisfied |
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
struct OneShotTimer { | |
fd: Box<std::os::unix::io::RawFd>, | |
e: Option<tokio_reactor::PollEvented<mio::unix::EventedFd<'static>>>, | |
} | |
impl OneShotTimer { | |
fn new(d: time::Duration) -> io::Result<Self> { | |
if d.as_secs() == 0 && d.subsec_nanos() == 0 { | |
// this would be interpreted as "inactive timer" by timerfd_settime | |
return Ok(OneShotTimer { |
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 run-cargo-script | |
//! ```cargo | |
//! [dependencies] | |
//! tokio = "0.1" | |
//! hyper = "0.12" | |
//! futures = "0.1" | |
//! tower-service = { git = "https://github.com/tower-rs/tower.git" } | |
//! tower-buffer = { git = "https://github.com/tower-rs/tower.git" } | |
//! ``` | |
extern crate futures; |
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 crate async_bincode; | |
#[macro_use] | |
extern crate futures; | |
extern crate serde; | |
#[macro_use] | |
extern crate serde_derive; | |
extern crate bincode; | |
extern crate tokio; | |
extern crate tower_service; |
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
.message-group .comment .markup, .chat { | |
color: inherit; | |
} | |
.message-group.compact .message .timestamp { | |
color: #555; | |
float: right; | |
} | |
.reaction .reaction-count { | |
color: inherit; |
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
#0 0x00007fafb46f7ffc in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0 | |
#1 0x000055e6e56d7d3c in std::sys::unix::condvar::Condvar::wait (self=0x7faf9ae51130, mutex=0x7faf9ae51100) | |
at /checkout/src/libstd/sys/unix/condvar.rs:78 | |
#2 0x000055e6e56d7ce6 in std::sys_common::condvar::Condvar::wait (self=0x7faf9ae51130, mutex=0x7faf9ae51100) | |
at /checkout/src/libstd/sys_common/condvar.rs:51 | |
#3 0x000055e6e56d458a in std::sync::condvar::Condvar::wait (self=0x7faf9afaade8, guard=...) | |
at /checkout/src/libstd/sync/condvar.rs:214 | |
#4 0x000055e6e56d0047 in futures::task_impl::std::ThreadNotify::park (self=0x7faf9afaadd0) | |
at /home/jon/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.21/src/task_impl/std/mod.rs:536 | |
#5 0x000055e6e55f30f6 in futures::task_impl::std::<impl futures::task_impl::Spawn<F>>::wait_future::{{closure}} ( |
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/bash | |
echo "==> Clear blacklist" | |
sudo rm /etc/ca-certificates/trust-source/blacklist/*.pem | |
echo "==> Regenerate CA list" | |
sudo update-ca-trust | |
echo "==> Blacklisting all" | |
for f in /etc/ca-certificates/extracted/cadir/*.pem; do | |
sudo cp "$f" "/etc/ca-certificates/trust-source/blacklist/$(basename "$f")" | |
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
A simple script that estimates the progress, speed and probable completion time of a copy operation. | |
It was originally written for a QNAP NAS running busybox, but should be compatible with any busybox install. | |
Should also work for most Linux systems, but the options to du and df will have to be modified since the busybox uses a simplified syntax (The -m for both of them is to get the output in MB). | |
The script is called with the same arguments given to cp | |
The script estimates by using: | |
- Difference in df-used for speed | |
- Difference in du for percentage | |
- A combination of the above for ETC (Estimated Time to Completion) |
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
[Desktop Entry] | |
Name=Dungeon Keeper | |
Comment=Evil is Good | |
Exec=dosbox -conf ../dosboxDK.conf -conf ../dosboxDK_single.conf -noconsole -c exit | |
Icon=dungeon-keeper | |
Path=/home/user/.wine/drive_c/GOG Games/Dungeon Keeper Gold/DOSBOX | |
Terminal=false | |
Type=Application | |
Categories=Game; |