Skip to content

Instantly share code, notes, and snippets.

View gmlewis's full-sized avatar

Glenn Lewis gmlewis

View GitHub Profile
@gmlewis
gmlewis / keybase.md
Created January 6, 2017 06:31
keybase.io/gmlewis proof

Keybase proof

I hereby claim:

  • I am gmlewis on github.
  • I am gmlewis (https://keybase.io/gmlewis) on keybase.
  • I have a public key whose fingerprint is E4E3 9929 A48D 37D6 80B8 03E9 918E 136B FC90 EB4F

To claim this, I am signing this object:

@gmlewis
gmlewis / BlindsControl.ino
Created July 27, 2018 03:05
BlindsControl.ino - simple Arduino code to toggle position of dual (opposing) linear actuator
/*
BlindsControl - based on "Debounce" example.
Each time the input pin goes from LOW to HIGH (e.g. because of a push-button
press), the output pin is toggled from LOW to HIGH or HIGH to LOW. There's a
minimum delay between toggles to debounce the circuit (i.e. to ignore noise).
The circuit:
- LED attached from pin 13 to ground
- pushbutton attached from pin 2 to +5V
@gmlewis
gmlewis / filter-pub-test.go
Created August 12, 2018 21:57
filter-pub-test filters "pub run test" output to make it Emacs-friendly
// -*- compile-command: "go build filter-pub-test.go"; -*-
// filter-pub-test filters out the ANSI color codes from "pub run test" output.
// It also changes the output so that Emacs understands what file, line, and column
// numbers had the error so it can jump to the next error directly with "C-x `".
package main
import (
"bufio"
"bytes"
@gmlewis
gmlewis / VCoupling.h
Created March 4, 2019 13:13
VCoupling.h for Luis
// Verilated -*- C++ -*-
// DESCRIPTION: Verilator output: Primary design header
//
// This header should be included by all source files instantiating the design.
// The class here is then constructed to instantiate the design.
// See the Verilator manual for examples.
#ifndef _VCoupling_H_
#define _VCoupling_H_
@gmlewis
gmlewis / VCoupling.cpp
Created March 4, 2019 13:14
VCoupling.cpp for Luis
// Verilated -*- C++ -*-
// DESCRIPTION: Verilator output: Design implementation internals
// See VCoupling.h for the primary calling header
#include "VCoupling.h"
#include "VCoupling__Syms.h"
//--------------------
// STATIC VARIABLES
@gmlewis
gmlewis / Blockstack ID Verification
Created October 12, 2019 01:08
Blockstack ID Verification for gmlewis_.id.blockstack
Verifying my Blockstack ID is secured with the address 1Mw9tvjwsu1wv4URimeCYxfYdWiEq6HV66 https://explorer.blockstack.org/address/1Mw9tvjwsu1wv4URimeCYxfYdWiEq6HV66
@gmlewis
gmlewis / grain-compile-error.log
Created May 7, 2021 15:09
grain compile error on Linux
~/src/github.com/grain-lang $ git clone git@github.com:grain-lang/grain
Cloning into 'grain'...
remote: Enumerating objects: 15460, done.
remote: Counting objects: 100% (935/935), done.
remote: Compressing objects: 100% (459/459), done.
remote: Total 15460 (delta 578), reused 730 (delta 451), pack-reused 14525
Receiving objects: 100% (15460/15460), 6.32 MiB | 15.93 MiB/s, done.
Resolving deltas: 100% (10045/10045), done.
~/src/github.com/grain-lang $ cd grain
~/src/github.com/grain-lang/grain (main) $ ls
@gmlewis
gmlewis / main.go
Last active January 25, 2023 15:36
Dagger newbie troubleshooting first Go SDK pipeline
// on-push-or-pull-request executes the Dagger CI/CD pipeline
// for every push or pull request to any branch within this repo.
//
// Usage:
// go run cicd/go-on-push-or-pull-request/main.go
//
// It performs the following steps:
// - yarn install
// - yarn test:unit
// - yarn lint
@gmlewis
gmlewis / example.go
Last active January 25, 2023 21:43
Work in progress to bump the version in a repo and push back to repo
func main() {
ctx := context.Background()
if _, err := common.Build(ctx); err != nil {
log.Fatal(err)
}
if err := bumpMinorVersion(ctx); err != nil {
log.Fatal(err)
}
@gmlewis
gmlewis / build.go
Created February 3, 2023 00:58
Work in progress - build step using Dagger.io
package common
import (
"context"
"fmt"
"log"
"path/filepath"
"runtime"
"dagger.io/dagger"