Skip to content

Instantly share code, notes, and snippets.

View ananthp's full-sized avatar

Ananth Pattabiraman ananthp

View GitHub Profile
@ananthp
ananthp / ubuntu_18_04_input_devices_dont_work_after_logout.log
Created June 12, 2018 16:25
Ubuntu 18.04 LTS bug: Input devices stop working after logout or switch-user
# HP-G42 laptop
# Ubuntu 18.04 LTS
# kernel: 4.15.0-23-lowlatency #25-Ubuntu SMP PREEMPT Wed May 23 20:39:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
#
# excerpts from `journalctl`
Jun 12 20:39:00 hp_g42 /usr/lib/gdm3/gdm-x-session[1164]: (WW) modeset(0): flip queue failed: Permission denied
Jun 12 20:39:00 hp_g42 /usr/lib/gdm3/gdm-x-session[1164]: (WW) modeset(0): Page flip failed: Permission denied
Jun 12 20:39:00 hp_g42 /usr/lib/gdm3/gdm-x-session[1164]: (EE) modeset(0): present flip failed
-------------------------------------------------- after clicking logout --------------------------------------------------
@ananthp
ananthp / multiple_match.rs
Created September 6, 2018 15:37
Rust Experiments
fn main() {
let a = 12;
let message = match a { // what if multiple arms can be matched?
0 => "zero",
1...5 => "one to five",
x if x > 10 => ">10",
x if x < 20 => "<20",
_ =>"n/a"
};
@ananthp
ananthp / letter-spacing.svg
Created September 8, 2019 13:17
SVG Letter Spacing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ananthp
ananthp / midi-note-frequency.md
Last active January 12, 2021 15:26
midi-note-frequency
Midi Note    Frequency
  0. C -1        8.18 Hz
  1. C#-1        8.66 Hz
  2. D -1        9.18 Hz
  3. D#-1        9.72 Hz
  4. E -1       10.30 Hz
  5. F -1       10.91 Hz
  6. F#-1       11.56 Hz
  7. G -1       12.25 Hz