Skip to content

Instantly share code, notes, and snippets.

View conoro's full-sized avatar

Conor O'Neill conoro

View GitHub Profile
@conoro
conoro / hexo2hugo.sh
Created July 10, 2016 09:55
Hexo to Hugo converter
# code is from http://helw.net/2015/07/19/migrating-to-hugo-from-hexo/
# Ran fine on Windows 10 with MSysGit installed
# cd to directory with all the md files from Hexo
# bash hexo2hugo.sh
---
# ensure dates don't start with single quotes
for file in *; do awk '{
if ($1 == "date:") {
gsub("\047", "", $0); print;
} else {
@conoro
conoro / slugify-hugo.go
Created July 10, 2016 09:52
Add a slug field to every post in Hugo to avoid periods and caps in urls
package main
import (
"fmt"
"io/ioutil"
"log"
"os"
"path/filepath"
"regexp"
"strings"
@conoro
conoro / package.json
Created June 22, 2016 14:28
Hello Node
{
"name": "hello-node",
"version": "1.0.0",
"description": "Hello Node",
"main": "server.js",
"dependencies": {
"config-multipaas": "^0.2.2",
"express": "*"
},
"scripts": {
@conoro
conoro / storm-test.go
Created May 7, 2016 14:41
Storm Test for YTPodders
package main
import (
"fmt"
"os"
"strings"
"time"
"github.com/SlyMarbo/rss"
"github.com/asdine/storm"
@conoro
conoro / cross-compile-go-arm64.md
Created April 23, 2016 16:24
Cross-compiling Golang for ARM64 (aarch64) e.g. Pine64 on Fedora AMD64
  • Install Go for Linux the usual way on your main Linux box:
cd
wget https://storage.googleapis.com/golang/go1.6.2.linux-amd64.tar.gz
tar -zxvf go1.6.2.linux-amd64.tar.gz
sudo mv go /usr/local/
export GOROOT=/usr/local/go
mkdir -p ~/gitwork/go/src
mkdir ~/gitwork/go/bin
@conoro
conoro / workers.csv
Last active February 4, 2022 13:01
Simple example single column CSV file
Roger Flopple
Demetrius Levenworth
Salamander Hammerhead
Ferrari Montenegro
Paul Corduroy
Hank Fracas
Ludwig Von Instagram
Lisa Toboggan
Heather Kerfuffle
Rebecca Beretta
@conoro
conoro / cmd_output.go
Created March 18, 2016 20:56
How to see actual command errors in Go when shelling out
package main
import (
"bytes"
"fmt"
"os/exec"
)
func main() {
@conoro
conoro / gkvlitetest.go
Created February 24, 2016 15:48
Testing gkvlite Key Value Store in Go on Onion Omega
package main
import (
"fmt"
"os"
"github.com/steveyen/gkvlite"
)
func main() {
@conoro
conoro / stowtest.go
Created February 24, 2016 15:46
Test Stow + BoltDB in Golang
package main
import (
// "hash/fnv"
"fmt"
"github.com/conoro/bolt"
"github.com/djherbis/stow"
"github.com/k0kubun/pp"
//"github.com/twinj/uuid"
@conoro
conoro / go-mips32.cmd
Created February 24, 2016 15:37
Run a Windows CMD prompt setup for GO MIPS32 cross-compilation
set GOOS=linux
set GOARCH=mips32
set GOROOT=d:\gitwork\go-mips32
set GOPATH=d:\gitwork\go
set PATH=d:\gitwork\go-mips32\bin;%PATH%
CMD