Skip to content

Instantly share code, notes, and snippets.

View elijahmanor's full-sized avatar
😀

Elijah Manor elijahmanor

😀
View GitHub Profile
@elijahmanor
elijahmanor / realtime-twitter-banner.json
Created June 5, 2022 17:12
Real-time Twitter Banner Config
{
"editor": "source",
"widgets": [
{
"data": {
"type": "user"
},
"type": "background"
},
{
@elijahmanor
elijahmanor / README.md
Last active May 11, 2022 09:52
Export @code Extensions to a Markdown List

You can run either of the following snippets in your terminal to generate a markdown list of your VS Code extensions.

code --list-extensions | awk '{ print "* [" $1 "](https://marketplace.visualstudio.com/items\?itemName\=" $1 ")" }'

npx https://gist.github.com/elijahmanor/7f9762a4c2296839ad33e33513e88043

NOTE: You can append | pbcopy to either of the above commands to pipe the output to your Mac's copy/paste buffer.

@elijahmanor
elijahmanor / index.js
Created August 4, 2018 19:18
Run JavaScript in the terminal from a gist with npx
#!/usr/bin/env node
console.log( "Look Ma, I'm executing JavaScript from a gist inside the terminal with npx!" );
@elijahmanor
elijahmanor / pros-cons-npmscripts-vs-gulp.md
Last active February 20, 2022 12:46
Pros and Cons of `npm scripts` vs Gulp

Comparison of npm scripts vs Gulp

npm scripts

Pros

  • npm scripts are low-level and leverage the actual library you want to use (example: "lint": "eslint ./")
  • package.json is a central place to see what scripts are available (also npm run will list all scripts)
  • When things get too complicated you can always defer to another file (example: "complex-script": "babel-node tools/complex-script.js")
  • npm scripts are more powerful than one might first think (pre/post hooks, passing arguments, config variables, chaining, piping, etc...)
@elijahmanor
elijahmanor / main.go
Last active February 18, 2022 22:25
Tmux Status Right
package main
import (
"fmt"
"strings"
"os/exec"
"strconv"
)
const white = "#f8f8f2"
@elijahmanor
elijahmanor / index.html
Last active January 10, 2022 14:31
Fill JavaScript Array #jsbench #jsperf (http://jsbench.github.io/#2bcdfb2f21a686a56efc07d17e471a85) #jsbench #jsperf
<!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 / SassMeister-input.scss
Created July 8, 2014 04:19
Generated by SassMeister.com.
// ----
// Sass (v3.3.9)
// Compass (v1.0.0.alpha.20)
// Scut (v0.10.4)
// ----
@import "scut";
@mixin typeset( $type: body-copy ) {
$types: (
@elijahmanor
elijahmanor / doctors.js
Last active October 22, 2021 20:21
Reducing Filter and Map with Reduce
var doctors = [
{ number: 1, actor: "William Hartnell", begin: 1963, end: 1966 },
{ number: 2, actor: "Patrick Troughton", begin: 1966, end: 1969 },
{ number: 3, actor: "Jon Pertwee", begin: 1970, end: 1974 },
{ number: 4, actor: "Tom Baker", begin: 1974, end: 1981 },
{ number: 5, actor: "Peter Davison", begin: 1982, end: 1984 },
{ number: 6, actor: "Colin Baker", begin: 1984, end: 1986 },
{ number: 7, actor: "Sylvester McCoy", begin: 1987, end: 1989 },
{ number: 8, actor: "Paul McGann", begin: 1996, end: 1996 },
{ number: 9, actor: "Christopher Eccleston", begin: 2005, end: 2005 },
@elijahmanor
elijahmanor / .eslintrc
Last active August 16, 2021 20:29
Add Prettier & ESLint to VS Code with a Create React App
{
"extends": ["react-app", "plugin:prettier/recommended"]
}
@elijahmanor
elijahmanor / mac-apps.md
Last active May 5, 2021 11:50
Mac OSX Apps

Mac OS X Apps

  • Air Display Host
  • Alfred
  • Atom
  • Caffeine
  • CheatSheet
  • Dash
  • FileZilla
  • FIrefox