Using perf:
$ perf record -g binary
$ perf script | stackcollapse-perf.pl | rust-unmangle | flamegraph.pl > flame.svg
NOTE: See @GabrielMajeri's comments below about the
-g
option.
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
#/etc/udev/rules.d/99-nvidia-ac.rules | |
# Stop nvidia_powerd on battery | |
SUBSYSTEM=="power_supply",ENV{POWER_SUPPLY_ONLINE}=="0",RUN+="/usr/bin/systemctl --no-block stop nvidia-powerd.service" | |
# Start nvidia_powerd on AC | |
SUBSYSTEM=="power_supply",ENV{POWER_SUPPLY_ONLINE}=="1",RUN+="/usr/bin/systemctl --no-block start nvidia-powerd.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
Computer Information: | |
Manufacturer: Unknown | |
Model: Unknown | |
Form Factor: Laptop | |
No Touch Input Detected | |
Processor Information: | |
CPU Vendor: GenuineIntel | |
CPU Brand: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz | |
CPU Family: 0x6 |
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
.primary-bg { | |
background-color: #3fa1a5; } | |
.workspace-button { | |
padding: 2px; } | |
.workspace-button.active { | |
background-color: rgba(255, 255, 255, 0.32); } | |
.workspace-button.active .workspace-icon { | |
color: white; } |
I hereby claim:
- I am luke-nukem on github.
- I am luke_jones (https://keybase.io/luke_jones) on keybase.
- I have a public key whose fingerprint is E209 5AD4 C48A D6B6 0930 887F 0562 944A C278 E22C
To claim this, I am signing this object:
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/ion | |
let pwd = @(pwd) | |
for dir in @split(@(exa -D)) | |
cd $pwd/$dir | |
echo -e "\nIn $pwd/$dir" | |
if test -f Cargo.toml && not test -f rust-toolchain | |
echo -e "Cleaning $dir" | |
cargo clean |
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
/// Problem: there is a lot of duplication in function implementations. | |
/// The two types should have the same interface but use a different underlying type. | |
/// | |
/// How can I reduce the amount of duplication and avoid having to update the code in two places? | |
/// In other languages, I would define a base class which accepts a generic type for the `SoundSource`s | |
/// but I don't know how to solve this sort of problem in Rust. | |
struct Sound { | |
// Shared properties | |
is_playing: bool, |
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
" Bare minimum for rust code | |
" I add other plugins for Nerdtree, git gutter, airline etc | |
all plug#begin('~/.vim/plugged') | |
" Status stuff | |
Plug 'Valloric/YouCompleteMe' | |
" show ctags (works with rust.vim too) | |
" see https://github.com/majutsushi/tagbar/wiki#rust for settings | |
Plug 'majutsushi/tagbar' | |
" for rls (and others) | |
Plug 'autozimu/LanguageClient-neovim', { |
I hereby claim:
- I am Luke-Nukem on github.
- I am luke_jones (https://keybase.io/luke_jones) on keybase.
- I have a public key whose fingerprint is 869A B608 13C4 24E5 06EB 0D3A 42E6 88B9 27B9 B1BD
To claim this, I am signing this object:
NewerOlder