Skip to content

Instantly share code, notes, and snippets.

View conoro's full-sized avatar

Conor O'Neill conoro

View GitHub Profile
@conoro
conoro / openwrt_go.patch
Created November 15, 2015 14:17
Diff to add Go 1.1.2 support to OpenWRT (as of 15/11/2015)
diff -ur orig/package/libs/toolchain/Makefile new/package/libs/toolchain/Makefile
--- orig/package/libs/toolchain/Makefile 2015-11-10 08:09:30.086903500 +0000
+++ new/package/libs/toolchain/Makefile 2015-11-15 14:02:44.125873000 +0000
@@ -254,6 +254,33 @@
endmenu
endef
+define Package/libgo
+$(call Package/gcc/Default)
+ TITLE:=Go support library
@conoro
conoro / wines.js
Created December 7, 2015 17:55
MySQL Connection Pooling and Data Format for RHMAP Forms
var express = require('express');
var bodyParser = require('body-parser');
var cors = require('cors');
var mysql = require('mysql');
var pool = mysql.createPool({
connectionLimit : 100, //important
host : process.env.MYSQL_HOST,
user : process.env.MYSQL_USERNAME,
password : process.env.MYSQL_PASSWORD,
@conoro
conoro / GoImports.py
Created December 10, 2015 16:33
Fixed version of GoImports main code for Sublime Text 3 on Windows
"""
Sublime Text 3 plugin to update list of packages imported
in a Go (golang) source file (scope: source.go) using 'goimports'
(http://github.com/bradfitz/goimports)
Author: Hamid Ghadyani
URL: https://github.com/spamwax/goimports-sublime-text-3
"""
import sublime
@conoro
conoro / bandonfews-tweets.go
Last active January 11, 2017 11:14
Bandon FEWS Tweets
// Copyright Conor O'Neill 2016. [email protected]
// cd /home/centos/gitwork/go/src/github.com/conoro/bandonfews-tweets/
// go build github.com/conoro/bandonfews-tweets
// go install github.com/conoro/bandonfews-tweets
// sudo systemctl restart bandonfews-tweets
package main
import (
"encoding/json"
@conoro
conoro / Oven_Thermometer_Dec2015.ino
Created December 31, 2015 16:50
Oven Thermometer using Arduino with Teensy 3.1, K-Type Thermocouple, DS1307 Realtime Clock, Adafruit AD8495 and ILI9341 TFT
// Temperature from AD8495 K-type Thermocoule adapter and Datetime from DS1307 RTC. Displayed on ILI9341 LCD.
//
// MIT License (MIT)
// Copyright (c) 2015 Conor O'Neill
// Portions copyright Limor Fried/Ladyada for Adafruit Industries and others
// Portions copyright Paul Stoffregen
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
@conoro
conoro / rhmapusers-email-extract.go
Last active October 11, 2016 08:58
RHMAP Studio email extractor for Mailshots
/*
RHMAP Studio email extractor for Mailshots
Copyright Conor O'Neill 2016, [email protected]
MIT License https://opensource.org/licenses/MIT
You may need to create a User API key in your Profile in the Studio called X-FH-AUTH-USER
Then:
@conoro
conoro / mattermost-rssfeeds.go
Last active January 24, 2016 19:45
An RSS feed subscription tool for Mattermost. Barely started. Does not work yet.
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
@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
@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 / 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() {