Skip to content

Instantly share code, notes, and snippets.

http://www.amazon.co.uk/gp/product/B00AFRXKFU
Load uslcom.ko - either kldload it, add to loader.conf, or compile into kernel (see uslcom(4))
<attach Pi>
sudo cu -l /dev/ttyU0 -s 115200
Tested on FreeBSD-CURRENT (r292435)
@x32net
x32net / smtp-gmail-send.go
Created June 24, 2016 12:39 — forked from jpillora/smtp-gmail-send.go
Send email using Go (Golang) via GMail with net/smtp
package main
import (
"log"
"net/smtp"
)
func main() {
send("hello there")
}
@x32net
x32net / wait_timeout.go
Created June 8, 2016 07:32
Golang - WaitGroup Timeout
package main
import (
"fmt"
"sync"
"time"
)
func main() {
wg := sync.WaitGroup{}
@x32net
x32net / go_example_websocket_novnc.go
Last active August 2, 2019 08:22 — forked from bit4bit/go_example_websocket_novnc
Example: Go Websocket binary proxy noVnc
// Go Websocket binary proxy noVnc
package main
import (
"flag"
"golang.org/x/net/websocket"
"io"
"log"
"net"
"net/http"
@x32net
x32net / gist:7edbaa942016a2a3f0d0bac77c1c74c2
Created June 7, 2016 07:53 — forked from nl5887/gist:f88ca64b67f7dce3690c
Dynamically returns a zip file consisting of multiple Amazon S3 objects
// download zipfile
func ZipHandler(w http.ResponseWriter, r *http.Request) {
vars := mux.Vars(r)
token := vars["token"]
db, err := sql.Open("mysql", config.DSN)
if err != nil {
panic(err.Error()) // Just for example purpose. You should use proper error handling instead of panic
}
@x32net
x32net / application.go
Created June 2, 2016 08:14 — forked from dimiro1/application.go
Implementation of the Thrift Servlet with golang net/http handler function
// Copyright (c) 2016, Claudemiro Alves Feitosa Neto
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
@x32net
x32net / multipart_upload.go
Created May 23, 2016 11:03 — forked from mattetti/multipart_upload.go
Example of doing a multipart upload in Go (golang)
package main
import (
"bytes"
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
"os"
@x32net
x32net / TJSONProtocol.py
Last active April 26, 2016 11:57 — forked from fdelbos/TJSONProtocol.py
A Python JSON implementation of the Thrift protocol
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0