Skip to content

Instantly share code, notes, and snippets.

View eval-exec's full-sized avatar
👿
Now you will learn why you fear the night! 👿

Eval Exec eval-exec

👿
Now you will learn why you fear the night! 👿
View GitHub Profile
// snippet of code @ 2024-04-16 10:58:15
// === Rust Playground ===
// This snippet is in: /tmp/rust-playground/at-2024-04-16-105815/
use crossbeam_channel::{after, Sender};
use std::{io::Error, sync::mpsc};
// Execute the snippet: C-c C-c
// Delete the snippet completely: C-c k
// snippet of code @ 2024-04-16 10:58:15
// === Rust Playground ===
// This snippet is in: /tmp/rust-playground/at-2024-04-16-105815/
use crossbeam_channel::{after, Sender};
use std::{io::Error, sync::mpsc};
// Execute the snippet: C-c C-c
// Delete the snippet completely: C-c k
// snippet of code @ 2024-04-16 10:58:15
// === Rust Playground ===
// This snippet is in: /tmp/rust-playground/at-2024-04-16-105815/
use crossbeam_channel::{after, Sender};
use std::{io::Error, sync::mpsc};
// Execute the snippet: C-c C-c
// Delete the snippet completely: C-c k
@eval-exec
eval-exec / starttmux.sh
Created March 3, 2024 15:40 — forked from todgru/starttmux.sh
Start up tmux with custom windows, panes and applications running
#!/bin/sh
#
# Setup a work space called `work` with two windows
# first window has 3 panes.
# The first pane set at 65%, split horizontally, set to api root and running vim
# pane 2 is split at 25% and running redis-server
# pane 3 is set to api root and bash prompt.
# note: `api` aliased to `cd ~/path/to/work`
#
session="work"
use std::sync::atomic::{AtomicU64, Ordering};
use std::sync::Arc;
use std::thread;
fn work() {
let a: Arc<AtomicU64> = Arc::new(AtomicU64::new(0));
let b: Arc<AtomicU64> = Arc::new(AtomicU64::new(0));
let j1 = thread::spawn({
let (a, b) = (Arc::clone(&a), Arc::clone(&b));
move || {
@eval-exec
eval-exec / main.rs
Last active December 27, 2022 10:28
faketime issue
use serial_test::serial;
use std::sync::atomic::{AtomicBool, AtomicU64, Ordering};
// Store faketime timestamp here
#[cfg(test)]
static FAKETIME: AtomicU64 = AtomicU64::new(0);
// Indicate whether faketime is enabled
#[cfg(test)]
static ENABLE_FAKETIME: AtomicBool = AtomicBool::new(false);
@eval-exec
eval-exec / keybase.md
Last active April 9, 2021 03:53
keybase-EvalExec

Keybase proof

I hereby claim:

  • I am eval-exec on github.
  • I am evalexec (https://keybase.io/evalexec) on keybase.
  • I have a public key ASAS32BmGyl2RAfD4cvjjXctlhTIfkzw47huOHwSHsk96Ao

To claim this, I am signing this object: