Skip to content

Instantly share code, notes, and snippets.

View SeanChristopherConway's full-sized avatar

Sean Conway SeanChristopherConway

  • Programmer
  • Sherwood Park, AB, Canada
View GitHub Profile
buf, bodyErr := ioutil.ReadAll(r.Body)
if bodyErr != nil {
log.Print("bodyErr ", bodyErr.Error())
http.Error(w, bodyErr.Error(), http.StatusInternalServerError)
return
}
rdr1 := ioutil.NopCloser(bytes.NewBuffer(buf))
rdr2 := ioutil.NopCloser(bytes.NewBuffer(buf))
log.Printf("BODY: %q", rdr1)
@SeanChristopherConway
SeanChristopherConway / loonieminters.json
Last active January 23, 2021 17:04
lonnie cardano pool metadata
{
"name": "LoonieMinters",
"description": "Minting virtual loonies in ada format",
"ticker": "TICKER",
"homepage": "https://seanchristopherconway.github.io/"
}
@SeanChristopherConway
SeanChristopherConway / Makefile
Created November 11, 2020 02:14
Makefile for protoc protobuf creation for both improbable grpc-web js and a golang service
compile:
protoc --proto_path=api/protobuf api/protobuf/*.proto --go-grpc_out=internal/pb --go_out=internal/pb
compile_web:
protoc \
--plugin=protoc-gen-ts=api/protobuf/js/node_modules/.bin/protoc-gen-ts \
--proto_path=api/protobuf api/protobuf/*.proto \
--js_out=import_style=commonjs,binary:internal/pb/js \
--ts_out="service=grpc-web:internal/pb/js"
@SeanChristopherConway
SeanChristopherConway / GoogleIDToken.go
Created September 25, 2020 04:35 — forked from salrashid123/GoogleIDToken.go
Google ID Tokens with Golang
package main
import (
"context"
"io/ioutil"
"log"
"net/http"
"google.golang.org/api/idtoken"
)
@SeanChristopherConway
SeanChristopherConway / curl_post_json.md
Created September 25, 2020 04:30 — forked from ungoldman/curl_post_json.md
post a JSON file with curl

How do you POST a JSON file with curl??

You can post a json file with curl like so:

curl -X POST -H "Content-Type: application/json" -d @FILENAME DESTINATION

so for example:

@SeanChristopherConway
SeanChristopherConway / wsl-go-install.sh
Created August 31, 2020 19:00
Script to install Go 1.8.3 on Linux and WSL (Windows Subsystem for Linux)
#!/bin/bash
set -e
GVERSION="1.8.3"
GFILE="go$GVERSION.linux-amd64.tar.gz"
GOPATH="$HOME/projects/go"
GOROOT="/usr/local/go"
if [ -d $GOROOT ]; then
echo "Installation directories already exist $GOROOT"

I’m looking for any tips or tricks for making chrome headless mode less detectable. Here is what I’ve done so far:

Set my args as follows:

const run = (async () => {

    const args = [
        '--no-sandbox',
        '--disable-setuid-sandbox',
        '--disable-infobars',
@SeanChristopherConway
SeanChristopherConway / rpi_ansible_install.sh
Created April 5, 2019 01:17
Raspberry pi install newer version of ansible
sudo apt-get install dirmngr
#Edit your /etc/apt/sources.list and append
deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main
#then run
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
sudo apt-get update
sudo apt-get install ansible
@SeanChristopherConway
SeanChristopherConway / README
Last active April 3, 2019 05:15
raspberry pi vcgencmd calls
0: under-voltage
1: arm frequency capped
2: currently throttled
16: under-voltage has occurred
17: arm frequency capped has occurred
18: throttling has occurred
@SeanChristopherConway
SeanChristopherConway / docker-compose.yaml
Last active June 15, 2022 00:30
Docker Pihole with unbound for authoritative, validating, recursive caching DNS
version: "3.7"
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
dns: 127.0.0.1
restart: unless-stopped
links:
- unbound