Skip to content

Instantly share code, notes, and snippets.

View skeptomai's full-sized avatar
🐒
Monkeying around

Christopher Brown skeptomai

🐒
Monkeying around
View GitHub Profile
@skeptomai
skeptomai / Toggle Audio.scpt
Last active March 23, 2020 18:22
Toggle Audio in Amazon Chime Meeting
set old to (path to frontmost application as text)
tell application "Amazon Chime"
activate
end tell
tell application "System Events" to tell process "Amazon Chime"
repeat with aWindow in windows
try
if title of aWindow does not contain "Amazon Chime" then
click button 1 of group 2 of toolbar 1 of aWindow
end if
@skeptomai
skeptomai / main.rs
Last active April 16, 2020 15:38
prefix expression interview question in rust
// I was working on this code for a while before I discovered the article below..
// https://medium.com/@wastedintel/reference-iterators-in-rust-5603a51b5192
use env_logger;
use log::info;
use std::fmt;
use std::io;
use std::io::prelude::*;
#[derive(Debug, PartialEq)]
enum TokenType {
@skeptomai
skeptomai / setting-up-xps-15-9560.org
Last active February 7, 2021 21:41
Installing Ubuntu 16.04 on Dell XPS 15 (9560)

Installing Ubuntu 18.04 on Dell XPS 15 (9560)

Booting and Installing

Find a reference for creating a bootable Ubuntu 18.04 USB. You’ll need to follow one of the references below to make BIOS changes for the disk, secure boot, and legacy boot options.

Grub command line

Hit F12 while booting, and select the USB UEFI device corresponding to your USB key. Unless you alter the Grub command line, Ubuntu Live will hang initializing the NVIDIA card.

@skeptomai
skeptomai / Dockerfile
Created December 24, 2017 15:20
docker static media
FROM nginx
RUN mkdir -p /usr/share/nginx/media && \
chmod aog+x /usr/share/nginx/media
# ADD Music/ /usr/share/nginx/media/
COPY conf.d/default.conf /etc/nginx/conf.d/default.conf
# run with
# docker run --name nightvale -p 8443:443 -p 8080:80 -v $(pwd)/Music:/usr/share/nginx/media skeptomai/nginx-nightvale:latest
@skeptomai
skeptomai / interview.go
Last active January 30, 2020 21:34
quick prefix expression evaluator
package main
import (
"bufio"
"errors"
"fmt"
"os"
"strconv"
"strings"
)
Verifying that +skeptomai is my blockchain ID. https://onename.com/skeptomai
Contacting host: melpa.milkbox.net:80
Parsing tar file...done
Extracting go-mode-20150129.313/
Extracting go-mode-20150129.313/go-mode-pkg.el
Wrote /Users/cb/.emacs.d/elpa/go-mode-20150129.313/go-mode-pkg.el
Extracting go-mode-20150129.313/go-mode.el
Wrote /Users/cb/.emacs.d/elpa/go-mode-20150129.313/go-mode.el
Extracting go-mode-20150129.313/go-mode-autoloads.el
Wrote /Users/cb/.emacs.d/elpa/go-mode-20150129.313/go-mode-autoloads.el
Making version-control local to go-mode-autoloads.el while let-bound!
### Keybase proof
I hereby claim:
* I am skeptomai on github.
* I am skeptomai (https://keybase.io/skeptomai) on keybase.
* I have a public key whose fingerprint is 6781 5D2B C42A 708D 09A1 122B A77D FA61 6E77 C05F
To claim this, I am signing this object:
#!/usr/bin/ruby
require 'openssl'
pathglob = File.join(ARGV[0], "*.crt")
sans = []
Dir.glob(pathglob).each do |cert_filename|
@skeptomai
skeptomai / switch_cwd.el
Created December 1, 2013 17:29
Switch emacs working directory when file is loaded with emacsclient
(add-hook 'server-switch-hook
(lambda nil
(let ((server-buf (current-buffer)))
(setq default-directory "/tmp"))))