Skip to content

Instantly share code, notes, and snippets.

@ShingoFukuyama
ShingoFukuyama / emacs mac osx say
Last active November 5, 2018 12:50
Utilizing `say' command which Mac OSX has for Emacs.Region lines and then `M-x osx-say' to make OSX speak.
;; Region lines and then `M-x osx-say' to make OSX speak.
;; Adjust speak speed
(setq osx-say-speed 180)
;; Change voice
;; Kathy, Vicki, Victoria, Alex, Bruce, Fred
(setq osx-say-voice "Alex")
(setq osx-say-buffer "*osx say*")
@tompng
tompng / ls2sl.cc
Last active April 9, 2020 19:29
ls2sl for mac
//g++ -framework ApplicationServices ls2sl.cc
//enable [System Preferences -> Universal Access -> Access for assistive devices]
#include <stdio.h>
#include <ApplicationServices/ApplicationServices.h>
#include <sys/time.h>
#define BUFSIZE 100
int keyBuffer[BUFSIZE];
struct timeval timeBuffer[BUFSIZE];