Skip to content

Instantly share code, notes, and snippets.

⚠️
UNDER CONSTRUCTION

Christopher Hiller boneskull

⚠️
UNDER CONSTRUCTION
Block or report user

Report or block boneskull

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@boneskull
boneskull / nodejs.yml
Created Aug 13, 2019
sample node ci/cd config
View nodejs.yml
name: Node CI
on: [push]
jobs:
build:
name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
matrix:
@boneskull
boneskull / readme.patch
Created Jun 27, 2019
patch file of CPC README.md reformatted with prettier action
View readme.patch
From 3ad9624604c21f3b11000cdcdc4034e1cb45b26d Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Thu, 27 Jun 2019 04:44:25 +0000
Subject: [PATCH] prettier: lint fix
---
README.md | 64 +++++++++++++++++++++++++++----------------------------
1 file changed, 32 insertions(+), 32 deletions(-)
@boneskull
boneskull / README.md
Last active Jun 20, 2019
Run glances webserver as a user service (agent) on macOS
View README.md

com.boneskull.glances-web

This launch agent will automatically start a glances web server

Installation

  1. Install Homebrew.
  2. Install glances. Execute brew install glances.
  3. Copy the .plist file in this gist into ~/Library/LaunchAgents/.
  4. EDIT the .plist: change /Users/boneskull/ to /Users/<you>/
@boneskull
boneskull / README.md
Last active Feb 26, 2019
OpenVPN client + Deluge daemon setup
View README.md

This is my setup which automatically binds Deluge to the IP assigned by the OpenVPN server.

Assumes OpenVPN client uses the tun0 interface.

It's theoretically subject to race conditions, but have not had problems so far. There's probably a better way to do this, but I'm no systemd whiz.

Requires sponge be present (apt-get install sponge); was running into permissions problems when allowing sed to create a temp file.

Suggestions welcome!

@boneskull
boneskull / README.md
Created Jan 8, 2019
sorts working copies into subdirs by GitHub org name
View README.md

Given a directory full of working copies, like ~/projects, this script helps sort them into subdirectories based on org name. It inspects Git remote names and URLs to do so.

Currently doesn't handle forks very well, because git doesn't know what a fork is.

NOTE TO SELF: Hub is helpful. Use hub clone and hub fork --remote-name=origin rather than clicking the big green "Fork" button, as this sets up origin/upstream remotes properly.

@boneskull
boneskull / README.md
Created Jul 26, 2018
How to Use an ESP8266 w/ Johnny-Five
View README.md

How to Use an ESP8266 w/ Johnny-Five by boneskull

Prerequisite Software

  • Node.js v8.x
  • Arduino IDE v1.8.5
  • CP2104 driver (found linked here)

A toolchain to build native modules may be required. windows-build-tools may be the quickest way to get setup on Windows. macOS users will need to install XCode; Linux users will need to install build-essential, python, and likely some other stuff.

Add ESP8266 Board Support to Arduino IDE

@boneskull
boneskull / README.md
Last active Mar 16, 2019
MicroPython on ESP32: MQTT and DS18B20 temperature sensor full example
View README.md
View introduction-to-parser-combinators.md

In this tutorial we're going to build a set of parser combinators.

What is a parser combinator?

We'll answer the above question in 2 steps

  1. what is a parser?
  2. and.. what is a parser combinator?

So first question: What is parser?

@boneskull
boneskull / .babelrc
Created Dec 11, 2017
minimal mocha + babel setup to show import/export working
View .babelrc
{
"presets": ["env"]
}
@boneskull
boneskull / README.md
Last active Aug 26, 2019
example of how to debug mocha v4 if hanging
View README.md

Here's an example of how to debug Mocha v4 if it hangs.

Ensure you're using a Node.js 8 or newer (or any version with async_hooks support).

If you run your test, you'll notice it hangs:

$ mocha test.js
You can’t perform that action at this time.