Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.
Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.
The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.
// Please find the full, tested version in | |
// https://github.com/influxdata/influxdb_iox/blob/fe155e15fb2ad166aee66b0458e63c24a8128dd4/query/src/exec/task.rs#L101-L118 | |
pub struct DedicatedExecutor { | |
state: Arc<Mutex<State>>, | |
} | |
/// Runs futures (and any `tasks` that are `tokio::task::spawned` by | |
/// them) on a separate Tokio Executor | |
struct State { |
'use strict'; | |
const { | |
createHistogram, | |
performance: { | |
timerify | |
} | |
} = require('perf_hooks'); | |
const users = [ |
#![feature(generic_associated_types)] | |
trait Functor { | |
type Unwrapped; | |
type Wrapped<A>: Functor; | |
fn map<F, B>(self, f: F) -> Self::Wrapped<B> | |
where | |
F: FnOnce(Self::Unwrapped) -> B; | |
} |
use std::fmt; | |
pub struct JoinMyVec { | |
myvec : Vec<u32>, | |
} | |
impl fmt::Display for JoinMyVec { | |
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { | |
let s = fmt.write_str(&join(&self.myvec[..], &""))?; | |
Ok(s) |
use std::thread::spawn; | |
use std::sync::Arc; | |
use std::sync::Mutex; | |
use std::sync::mpsc; | |
#[derive(Debug)] | |
struct Transaction { | |
amount: isize, | |
timestamp: u64, | |
txid: String, |
Morpheus: You have to let it all go, Neo. Fear, doubt, and disbelief. Free your mind.
We live in a world full of distractions - both in our private and professional lives. I'll show you how to keep track of things and focus on what really matters.
Vote for this talk by pushing the ⭐ Star button ↗ on the top right ↗
// Suppose you have a variable named `future` which implements the `Future` trait. | |
let future: impl Future = ...; | |
// This gist demonstrates how to run the future until completion using the `stdweb` crate. | |
// The various imports. | |
extern crate futures; | |
extern crate stdweb; |
#![feature(lang_items)] | |
#![no_std] | |
#[no_mangle] | |
pub fn add_one(x: i32) -> i32 { | |
x + 1 | |
} | |
// needed for no_std |