Skip to content

Instantly share code, notes, and snippets.

View emjayoh's full-sized avatar

Matt Ogram emjayoh

View GitHub Profile
@emjayoh
emjayoh / README
Created May 10, 2020 23:19 — forked from dejanr/README
OSX, X11, dwm, urxvt, vim environment
OSX Apps
- Total Spaces, for keeping X11 in different space and faster switching
- MenuAndDockless for hidding topbar menu
X11 - Macports
- sudo port install xorg-server
- sudo port install xinit
- sudo port install terminus-font dejavu-fonts bitstream-fonts
Suckless - suckless.org
@emjayoh
emjayoh / customizing-vs-code.md
Created May 12, 2020 21:04 — forked from rzvdaniel/customizing-vs-code.md
Customizing VS Code for Two Fonts.

Customizing VS Code

I followed the instructions in this blog post Multiple Fonts: Alternative to Operator Mono in VSCode, but did not see any changes made to VS Code. After digging a bit, I discovered that all the CSS class names had changed. They’re now e.g. .mtk13, .mtk16 { … }.

Gotchas

  • Ensure it’s a file URL e.g. { "vscode_custom_css.imports": [ "file:///Users/Brian/Desktop/vscode-style.css" ] }
  • If you move the location of your file and update your user settings with the new location, you will need to disable and enable custom CSS cmd+shift+p.
  • Also, anytime you change the style in your custom CSS file, you need to disable, then re-enable the extension.

For reference

@emjayoh
emjayoh / customizing-vs-code.md
Created May 13, 2020 15:37 — forked from nickytonline/customizing-vs-code.md
Customizing VS Code for Two Fonts.

Customizing VS Code

I followed the instructions in this blog post Multiple Fonts: Alternative to Operator Mono in VSCode, but did not see any changes made to VS Code. After digging a bit, I discovered that all the CSS class names had changed. They’re now e.g. .mtk13, .mtk16 { … }.

Gotchas

  • Ensure it’s a file URL e.g. { "vscode_custom_css.imports": [ "file:///Users/Brian/Desktop/vscode-style.css" ] }
  • If you move the location of your file and update your user settings with the new location, you will need to disable and enable custom CSS cmd+shift+p.
  • Also, anytime you change the style in your custom CSS file, you need to disable, then re-enable the extension.

For reference

@emjayoh
emjayoh / cask_upgrade.sh
Created June 4, 2020 14:56
Script upgrading outdated brew casks
#!/usr/bin/env bash
(set -x; brew update;)
(set -x; brew cleanup;)
(set -x; brew cask cleanup;)
red=`tput setaf 1`
green=`tput setaf 2`
reset=`tput sgr0`
@emjayoh
emjayoh / SlackPGP.js
Last active January 13, 2021 08:53 — forked from lmarkus/SlackPGP.js
[PGP over Slack using Greasemonkey] Check for update... #slack #greasemonkey #js #pgp #security
// ==UserScript==
// @name SlackPGP
// @namespace slack
// @description slackPGP
// @include https://*.slack.com/messages/*
// @version 1
// @grant none
// ==/UserScript==
@emjayoh
emjayoh / xrandr.sh
Last active January 13, 2021 08:53 — forked from chirag64/xrandr.sh
[Resolution adjustment xrandr] Useful for pesky resolution issues in linux #linux #graphics #xrandr #archlinux #bash
#!/bin/bash
#If no argument is specified, ask for it and exit
if [[ -z "$@" ]];
then
echo "An argument is needed to run this script";
exit
else
arg="$@"
#Basic check to make sure argument number is valid. If not, display error and exit
if [[ $(($(echo $arg | grep -o "\s" | wc --chars) / 2 )) -ne 2 ]];
@emjayoh
emjayoh / .leptonrc
Created October 17, 2020 01:59 — forked from hackjutsu/.leptonrc
[Template for .leptonrc] This is a template for Lepton's configuration file. Please place it on your home directory. #lepton
{
"theme": "light",
"autoUpdate": false,
"snippet": {
"expanded": true,
"newSnippetPrivate": false,
"sorting": "updated_at",
"sortingReverse": true
},
"editor" : {
@emjayoh
emjayoh / fif.sh
Last active November 18, 2020 15:15 — forked from gnanderson/fif.sh
[fif.sh - fuzzy + rg + bat] Find in file using ripgrep, then fuzzy find matched filenames with fzf, preview match using bat #fzf #terminal #bash #shell #bat #rg #function
fif() {
rg \
--column \
--line-number \
--no-column \
--no-heading \
--fixed-strings \
--ignore-case \
--hidden \
--follow \
#!/usr/bin/env python3
'''
A script to recursively compare two directories (including file size and file hash changes)
Usage: python3 compare_dirs.py DIR1 DIR2
'''
import os, sys, hashlib
COMPARE_FILES = True # should file sizes be compared if their names are the same?
@emjayoh
emjayoh / iphone-text-message-sqlite.sql
Created January 27, 2021 20:09 — forked from aaronhoffman/iphone-text-message-sqlite.sql
SQLite SQL Query for iPhone Text Message Backup
-- more info http://aaron-hoffman.blogspot.com/2017/02/iphone-text-message-sqlite-sql-query.html
select
m.rowid
,coalesce(m.cache_roomnames, h.id) ThreadId
,m.is_from_me IsFromMe
,case when m.is_from_me = 1 then m.account
else h.id end as FromPhoneNumber
,case when m.is_from_me = 0 then m.account
else coalesce(h2.id, h.id) end as ToPhoneNumber
,m.service Service