Skip to content

Instantly share code, notes, and snippets.

View zacbrown's full-sized avatar
💭
💩

Zac Brown zacbrown

💭
💩
View GitHub Profile
@zacbrown
zacbrown / transformers.rs
Created December 2, 2020 20:24 — forked from snoyberg/transformers.rs
Transformers: Rust in disguise
#![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;
}
@zacbrown
zacbrown / 01-mac-profiling.md
Created July 18, 2018 19:57 — forked from loderunner/01-mac-profiling.md
Profiling an application in Mac OS X

Profiling an application in Mac OS X

Finding which process to profile

If your system is running slowly, perhaps a process is using too much CPU time and won't let other processes run smoothly. To find out which processes are taking up a lot of CPU time, you can use Apple's Activity Monitor.

The CPU pane shows how processes are affecting CPU (processor) activity: