Skip to content

Instantly share code, notes, and snippets.

View goodwid's full-sized avatar

David Goodwin goodwid

  • Millinocket, Maine
  • 15:14 (UTC -04:00)
  • X @goodwid
View GitHub Profile
# : << EOF
# https://github.com/gpakosz/.tmux
# (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license,
# without any warranty.
# Copyright 2012— Gregory Pakosz (@gpakosz).
# -- navigation ----------------------------------------------------------------
# if you're running tmux within iTerm2

Keybase proof

I hereby claim:

  • I am goodwid on github.
  • I am flaim (https://keybase.io/flaim) on keybase.
  • I have a public key ASBoMcLeBpaQ6q7MFdD9UkGdPX9u6t9VvbY1fB6fcsfOxAo

To claim this, I am signing this object:

#!/bin/sh
lower=$(echo $1 | sed -e 's/^./\L&\E/')
mkdir $1
touch $1/$1.css
touch $1/index.js
cat > $1/$1.js <<EOF
import React, { Component } from 'react';
import styles from './$1.css';
@goodwid
goodwid / hdtempmonitor.js
Last active May 26, 2020 15:26
Refactor of /u/LookAtMyKeyboard's hd temp monitor script
#!/usr/bin/env node
const util = require('util');
const exec = require('child_process').exec;
const style = require('ansi-styles');
const disks = ['/dev/sdb', '/dev/sdb', '/dev/sdb', '/dev/sdb','/dev/sdb', '/dev/sdb','/dev/sdb', '/dev/sdb' ];
exec(`hddtemp ${disks.join(' ')}`, function(error, stdout, stderr){
if (!error){

fun with console.log formatting..

TIL that you can format console.log() output.

Paste this into the console, yo.

const hilight = 'color: yellow; font-style: italic; background-color:red;padding: 2px;';
const standard = 'color: black; font-style: normal; background-color:white;padding: 0px;';
console.log('%cThis is a %cTest%c of formatting', standard, hilight, standard);
var BTN = D4;
var LED = D0;
var isOn = false;
var options = {
repeat: true
}
setWatch(function() {
console.log('reading!');
isOn = !isOn;
},BTN, options);