Skip to content

Instantly share code, notes, and snippets.

@focusaurus
focusaurus / build.sh
Created January 26, 2017 02:49
Build script detects macOS and runs itself under docker
#!/usr/bin/env bash
cd "$(dirname "$0")/.."
if [[ "$(uname)" == "Darwin" ]]; then
docker build --tag foo-rpmbuild .
docker run --interactive --tty --rm \
--volume "${PWD}:/opt/docker-host" \
--volume "$(yarn cache dir | grep '^/'):/var/run/yarn-cache" \
foo-rpmbuild /opt/docker-host/bin/build.sh
exit
@focusaurus
focusaurus / build.sh
Last active June 5, 2017 09:20
markdown slides with reveal build snippet
#!/usr/bin/env bash
base_build() {
build_dir="./build"
mkdir -p "${build_dir}"
# OSX build support. BSD tar vs GNU tar issue
if [[ "$(uname)" == "Darwin" ]]; then
alias tar=gtar
fi
# This takes all files that have been at least added to git
@focusaurus
focusaurus / notes.md
Last active October 17, 2017 00:02
Regular Expression Registry

What

A registry of regular expressions

Base Data

  • The expression string
  • taxonomy/category
  • supported engines
  • a set of test inputs
@focusaurus
focusaurus / notes.md
Last active October 23, 2017 18:54
node --inspect bugs

Call Stack Expanding: Summary

When debugging node.js via devtools and --inspect, the devtools "Call Stack" accordian panel expands automatically, forcing the "Scope" panel out of the viewable area.

Versions

  • macOS 10.13
  • node v6.11.4, node v6.11.3
  • Chrome 62.0.3202.62, Chrome 61.0.3163.100
@focusaurus
focusaurus / remark-latest-min.js
Last active July 22, 2018 13:30
remark slide boilerplate
require=function e(t,a,r){function s(i,l){if(!a[i]){if(!t[i]){var o="function"==typeof require&&require;if(!l&&o)return o(i,!0);if(n)return n(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var d=a[i]={exports:{}};t[i][0].call(d.exports,function(e){var a=t[i][1][e];return s(a?a:e)},d,d.exports,e,t,a,r)}return a[i].exports}for(var n="function"==typeof require&&require,i=0;i<r.length;i++)s(r[i]);return s}({1:[function(e,t,a){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function s(e){return"function"==typeof e}function n(e){return"number"==typeof e}function i(e){return"object"==typeof e&&null!==e}function l(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!n(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,a,r,n,o,c;if(th
@focusaurus
focusaurus / docker-run.sh
Created October 17, 2018 03:57
Script to drop into myproject/bin and go to town with docker
#!/usr/bin/env bash
# Please Use Google Shell Style: https://google.github.io/styleguide/shell.xml
# ---- Start unofficial bash strict mode boilerplate
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -o errexit # always exit on error
set -o errtrace # trap errors in functions as well
set -o pipefail # don't ignore exit codes when piping output
set -o posix # more strict failures in subshells
@focusaurus
focusaurus / fuzzball.sh
Created November 25, 2018 18:22
Fuzzball desktop automation script
#!/usr/bin/env bash
# Please Use Google Shell Style: https://google.github.io/styleguide/shell.xml
# ---- Start unofficial bash strict mode boilerplate
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -o errexit # always exit on error
set -o errtrace # trap errors in functions as well
set -o pipefail # don't ignore exit codes when piping output
set -o posix # more strict failures in subshells
/ # ldd /usr/local/bin/zola
/lib64/ld-linux-x86-64.so.2 (0x7fac5eead000)
Error loading shared library libstdc++.so.6: No such file or directory (needed by /usr/local/bin/zola)
libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x7fac5eead000)
librt.so.1 => /lib64/ld-linux-x86-64.so.2 (0x7fac5eead000)
libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7fac5eead000)
Error loading shared library libgcc_s.so.1: No such file or directory (needed by /usr/local/bin/zola)
libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7fac5eead000)
Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /usr/local/bin/zola)
libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7fac5eead000)
@focusaurus
focusaurus / message.md
Last active March 11, 2019 02:41
Denver/Boulder Freelance Web Developers Meetup Group Shutting Down

This Meetup Group Can No Longer Be No-Cost and Will Terminate

Prakash has stepped down as the only officially-registered organizer of our meetup group, although Pete Lyons and Rylan Bowers had also done some light organizing as needed.

However, it seems although we've had the meetup group on super-low simmer mode for several years, we will no longer be able to use Meetup for free according to their guidlines (fewer than 50 members and 3 organizers). We have some 354 members currently.

In order to continue the meetup group, Meetup wants $14.99/month. Since we hold in-person meetups so rarely and the attendance is only a tiny fraction of our membership, Rylan and I are inclined to allow the meetup group to lapse and be shut down.

Please Continue to Use Our Slack