Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View gnagel's full-sized avatar
🥳
Cranking on new projects, and nuking tech debt with a flamethrower 🔥

Glenn Nagel gnagel

🥳
Cranking on new projects, and nuking tech debt with a flamethrower 🔥
View GitHub Profile
@gnagel
gnagel / tar_helper.go
Created February 25, 2023 15:35 — forked from maximilien/tar_helper.go
Creating tarball in Golang
package tar_helper
import (
"archive/tar"
"compress/gzip"
"errors"
"fmt"
"io"
"io/ioutil"
"os"
from queue import Queue
from threading import Thread
from time import sleep
from rich.live import Live
from rich.panel import Panel
@gnagel
gnagel / TXF Specification Document v042.txt
Created March 19, 2022 14:18
TXF Specification Document v042
* TXF Spec Version 042
Topic: Tax Exchange Format
Change Date: 11/30/11
File: TXF
Version: 042
____________________________________________________________
TABLE OF CONTENTS BY SECTION HEADINGS

WARNING MAY BE INCORRECT AND INCOMPLETE, USE AT YOUR OWN RISK

Install Proxmox, RancherOS, in a VM with Rancher 2.0 and Portainer

Setup Proxmox

  1. Install Proxmox 5.3
  2. Console/SSH into Proxmox
  3. nano /etc/apt/sources.list
  4. edit the file to look like this
@gnagel
gnagel / istio-gke-kiali
Created August 29, 2019 13:57 — forked from lucasponce/istio-gke-kiali
Install Istio in Google Kubernetes Engine + Update Kiali to latest
[0] Pre-requisites
Install google-cloud-sdk in your laptop
Documentation: https://cloud.google.com/sdk
Install helm in your laptop.
Documentation: https://helm.sh/docs/using_helm/#installing-helm
Get latest Istio.
curl -L https://git.io/getLatestIstio | ISTIO_VERSION=1.1.7 sh -
#!/usr/bin/env bash
#
# 1. Install the hyperkit VM for local kubernetes development
#
# > https://github.com/moby/hyperkit
#
brew install hyperkit jq
brew link --overwrite hyperkit

Templating engines and React.js

I want to make a shopify theme using react.

How shopify theming works

You have a bunch of template files that have access to global server-side variables with liquid e.g. {{ product.title }}. Think wordpress or any other theme-based system.

 /theme
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Draft • Decorators</title>
<link rel="stylesheet" href="../../dist/Draft.css" />
</head>
<body>
<div id="target"></div>
<script src="../../node_modules/react/dist/react.js"></script>
@gnagel
gnagel / domains.rb
Created March 5, 2016 18:28
Find me an available .io domain
#!/usr/bin/env ruby
require 'faraday'
io = ["adag", "ag", "ambros", "ambulat", "anton", "ap", "arpegg", "aud", "bagn", "bardigl", "barr", "bib", "bil", "bocacc", "borach", "bracc", "cab", "cadiue", "capricc", "caquet", "castal", "cellvibr", "cheer", "circumlit", "claud", "cl", "combolo", "conduct", "confederat", "conservator", "curcul", "cur", "daim", "dan", "desulfovibr", "disag", "dur", "dus", "equilibr", "escamb", "estad", "esthes", "exrad", "fasc", "fellat", "fer", "fiatconfirmat", "fidel", "finoch", "floripond", "fol", "g", "gob", "gugl", "hel", "histr", "horat", "idd", "imbrogl", "impresar", "intagl", "internunc", "", "jubilat", "jul", "kok", "kurosh", "latticin", "lucent", "mar", "med", "me", "migl", "misch", "mo", "mustach", "na", "nga", "noctil", "nunc", "oh", "ol", "orator", "ouaba", "overlubricat", "papil", "pap", "pat", "patric", "photointagl", "photorad", "pistach", "pol", "porphyr", "portfol", "port", "prerad", "presid", "punctil", "rad", "rascac", "rat", "rest", "r", "rorator", "rosar", "roso
@gnagel
gnagel / handler.js
Last active September 10, 2015 18:10 — forked from ThisIsMissEm/handler.js
The better way to execute Go on Amazon Lambda (see: http://blog.0x82.com/2014/11/24/aws-lambda-functions-in-go/)
var child_process = require('child_process');
exports.handler = function(event, context) {
var proc = spawn('./test', [ JSON.stringify(event) ], { stdio: 'inherit' });
proc.on('close', function(code){
if(code !== 0) {
return context.done(new Error("Process exited with non-zero status code"));
}