Skip to content

Instantly share code, notes, and snippets.

Avatar
😀

Elijah Manor elijahmanor

😀
View GitHub Profile
@elijahmanor
elijahmanor / realtime-twitter-banner.json
Created Jun 5, 2022
Real-time Twitter Banner Config
View realtime-twitter-banner.json
{
"editor": "source",
"widgets": [
{
"data": {
"type": "user"
},
"type": "background"
},
{
@elijahmanor
elijahmanor / README.md
Last active Apr 18, 2022
OCR from macOS Terminal
View README.md

I was reviewing a PR and there was a screenshot of the terminal that had output I wanted in text form.

Terminal Screenshot

So, I installed an OCR tool locally (called tesseract) and converted the PNG into TEXT.

# Install the OCR tool
brew install tesseract tesseract-lang
@elijahmanor
elijahmanor / main.go
Last active Feb 18, 2022
Tmux Status Right
View main.go
package main
import (
"fmt"
"strings"
"os/exec"
"strconv"
)
const white = "#f8f8f2"
@elijahmanor
elijahmanor / index.html
Last active Jan 10, 2022
Fill JavaScript Array #jsbench #jsperf (http://jsbench.github.io/#2bcdfb2f21a686a56efc07d17e471a85) #jsbench #jsperf
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Fill JavaScript Array #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@elijahmanor
elijahmanor / firebase.js
Created Sep 24, 2020
Firebase Code inside a Next.js API Function
View firebase.js
const firebase = require("firebase");
// Required for side-effects
require("firebase/firestore");
const firebaseConfig = { /* ... */ };
try {
firebase.initializeApp(firebaseConfig);
} catch (error) {
/*
@elijahmanor
elijahmanor / index.html
Last active Mar 12, 2020
react-playground
View index.html
<div id="app"></div>
@elijahmanor
elijahmanor / agnoster.zsh-theme
Created Jan 2, 2020
agnoster.zsh-theme with random emoji
View agnoster.zsh-theme
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
# Make sure you have a recent version: the code points that Powerline
@elijahmanor
elijahmanor / settings.json
Last active Nov 27, 2019
settings.json vs code
View settings.json
{
"editor.minimap.enabled": false,
"vim.easymotion": true,
"vim.highlightedyank.enable": true,
"vim.easymotionMarkerFontFamily": "Menlo, Monaco, 'Courier New', monospace",
"vim.easymotionMarkerYOffset": 6,
"vim.easymotionMarkerFontSize": "12",
"window.zoomLevel": 2,
"editor.cursorSmoothCaretAnimation": true,
"editor.smoothScrolling": true,
@elijahmanor
elijahmanor / agnoster.zsh-theme
Created Nov 27, 2019
Custom Tweaks to the Agnoster Theme
View agnoster.zsh-theme
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
# Make sure you have a recent version: the code points that Powerline
@elijahmanor
elijahmanor / README.md
Last active Nov 9, 2019
Create a macOS VirtualBox Instance on macOS
View README.md

Download a version of macOS using softwareupdate that will be downloaded to the /Applications folder.

softwareupdate --fetch-full-installer --full-installer-version 10.14.6

# Create a Catalina Virtual Disk Image

hdiutil create -o /tmp/Catalina -size 8500m -volname Catalina -layout SPUD -fs HFS+J

# Mount this Image to macOS