Skip to content

Instantly share code, notes, and snippets.

View sterpe's full-sized avatar

Steve Terpe sterpe

View GitHub Profile
@sterpe
sterpe / gist:19c6260d59233a39258a662787e32a08
Created June 22, 2019 03:38
macOS (BSD) colorized `ed(1)` terminal
#
# macOS (BSD) colorized `ed(1)` terminal
# [screen 0]
mkfifo /tmp/fifo; cat <>/tmp/fifo | pygmentize -P style=algol -sf 256 -l js
# [screen 1]
rlwrap -anc script -kF /tmp/fifo /bin/ed
sterpe-mbp:fink-0.44.1 sterpe$ ./bootstrap
Fink must be installed and run with superuser (root) privileges. Fink can automatically try to become root when it's run from a user account. Since you're currently running this script as a normal user, the method you choose will also be
used immediately for this script. Available methods:
(1) Use sudo
(2) Use su
(3) None, fink must be run as root
Choose a method: [1] 1
sterpe-mbp:fink-0.44.0 sterpe$ ./bootstrap
Fink must be installed and run with superuser (root) privileges. Fink can
automatically try to become root when it's run from a user account. Since
you're currently running this script as a normal user, the method you choose
will also be used immediately for this script. Available methods:
(1) Use sudo
(2) Use su
(3) None, fink must be run as root
@sterpe
sterpe / editorconfig.rb
Last active November 29, 2016 19:41
Overcommit Pre-commit hook: Editorconfig
module Overcommit::Hook::PreCommit
# Runs `editorconfig-tools check` against any modified files
#
# @see https://github.com/slang800/editorconfig-tools
class Editorconfig < Base
# There is no consistent message format unfortunately
MESSAGE_REGEX =/^.*$/
def run
result = execute(command, args: applicable_files)
@sterpe
sterpe / line_length.rb
Last active December 27, 2020 17:34
Overcommit LineLength pre-commit hook
# ./.git-hooks/pre_commit/line_length.rb
#
# E.g.:
# Precommit:
# LineLength:
# enabled: true
# description: Verify source line lengths do not exceed 72 columns
# max: 72
# include: ["src/**/*.*"]
#
//Get even more oldSKool
L10: var x
L20: var y
L30: var z
L40: x = 1
L50: y = 2
L60: z = 3
L70: console.log(x + y + z)
@sterpe
sterpe / irssi.md
Last active October 10, 2016 21:15
Compiling `irssi@` on OS X 10.11 El Capitan

Compile irssi-0.8.19 on OS X 10.11 w/Perl Support

Annotating this because it is such a pain.

My System:

  • OS X El Capitan (10.11.5)
  • Macbook Pro (15-inch, Early 2011)
  • 2 GHz Intel Core i7
  • 16 GB 1333 MHz DDR3
#!/bin/sh
# This is a utility command to clean up the various constants files.
#
# Usage is : ./scripts/constants.sh <file>
# It will alphabetize keys, and if any key is an array, it will
# alphabetize or order that array.
# It does not support multi-level nested objects but objects that
application-the-grid@0.0.0 /Users/sterpe/git/rp-core/sterpe/buyerui
├─┬ babel-core@5.8.25
│ ├── babel-plugin-constant-folding@1.0.1
│ ├── babel-plugin-dead-code-elimination@1.0.2
│ ├── babel-plugin-eval@1.0.1
│ ├── babel-plugin-inline-environment-variables@1.0.1
│ ├── babel-plugin-jscript@1.0.4
│ ├── babel-plugin-member-expression-literals@1.0.1
│ ├── babel-plugin-property-literals@1.0.1
│ ├── babel-plugin-proto-to-assign@1.0.4