Skip to content

Instantly share code, notes, and snippets.

View ninnemana's full-sized avatar
🏠

Alex Ninneman ninnemana

🏠
View GitHub Profile
package main
import (
"log"
"net/http"
"github.com/curt-labs/iapi/handlers"
"github.com/julienschmidt/httprouter"
)
package trucksplus
import (
"encoding/json"
"net/http"
"strconv"
"time"
"github.com/codegangsta/negroni"
"github.com/gorilla/mux"
@ninnemana
ninnemana / hello_world.cpp
Created July 8, 2015 01:50
C++ Hello World Example
#include <stdio.h>
int main() {
printf("Hello 世界!\n");
}

Introduction to Go

Go is a relatively new open source language that was created at Google, Go is a general purpose programming language with clean syntax, modern features, and a robust well-documented standard library.

The idea of another C-ish language might seem weird, but Go does bring something new to the table and its fundamental design principles make it different enough to justify its existence.

About the Speaker

Alex Ninneman is a full-stack engineer working at CURT Manufacturing, building API's and web applications in Go for the last 4 years.

#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
containsAll() {
let output = [];
let cntObj = {};
let array, item, cnt;
// for each array passed as an argument to the function
for (let i = 0; i < arguments.length; i++) {
array = arguments[i];
// for each element in the array
for (let j = 0; j < array.length; j++) {
item = '-' + array[j];
select bv.YearID, ma.MakeName, mo.ModelName, s.SubmodelName from Vehicle as v
join BaseVehicle as bv on v.BaseVehicleID = bv.BaseVehicleID
join Make as ma on bv.MakeID = ma.MakeID
join Model as mo on bv.ModelID = mo.ModelID
left join Submodel as s on v.SubmodelID = s.SubmodelID
where ma.MakeName = 'Suzuki' && bv.YearID = 2011
group by mo.ModelName
order by bv.YearID, mo.ModelName;
@ninnemana
ninnemana / startup.sh
Created March 5, 2015 17:18
FoundationDB Cluster Startup Script
#! /bin/bash
# Get Packages
echo Get Packages
gsutil cp gs://fdb/foundationdb-clients_3.0.7-1_amd64.deb .
gsutil cp gs://fdb/foundationdb-server_3.0.7-1_amd64.deb .
# Install FoundationDB
echo Install FoundationDB
sudo dpkg -i foundationdb-server_3.0.7-1_amd64.deb foundationdb-clients_3.0.7-1_amd64.deb
package main
import (
"github.com/bitly/go-nsq"
"log"
"sync"
)
func main() {
wg := &sync.WaitGroup{}
@ninnemana
ninnemana / ganalytics.go
Created February 3, 2015 15:14
Example of routing analytics using the Measurement Protocol in golang
package main
import (
"net/http"
"net/url"
)
func main() {
vals := make(url.Values, 0)