Skip to content

Instantly share code, notes, and snippets.

View mickelsonm's full-sized avatar

Matt Mickelson mickelsonm

  • USA
View GitHub Profile
var(
requestQueue = nsqq.NewQueue("goapi")
)
func MyRequestHandler(res http.ResponseWriter, req *http.Request){
//collects information from request object
//builds a struct, serializes it into json, then sends it into helper
if requestQueue != nil{
js, err := json.Marshal(myStruct)
package main
import (
"log"
"sync"
"github.com/bitly/go-nsq"
)
func main() {
@mickelsonm
mickelsonm / watcher.go
Created December 26, 2014 22:52
old watcher file
package main
import (
"fmt"
"github.com/str1ngs/util/file"
"log"
"os"
"os/exec"
"path/filepath"
"time"
@mickelsonm
mickelsonm / main.go
Created November 24, 2014 02:44
Golang program to lookup stocks by symbols using Yahoo Finance API.
package main
import (
"encoding/json"
"encoding/xml"
"fmt"
"io/ioutil"
"net/http"
"net/url"
)
@mickelsonm
mickelsonm / outline.txt
Created November 20, 2014 17:01
text2mindmap-outline for Company/CompanyID usage question
Company
BusinessClass
BlogCategories
BlogPost_BlogCategory
BlogPosts
CompanyToBrand
Brand
BrandPart
Part
CatPart
@mickelsonm
mickelsonm / main.go
Last active August 29, 2015 14:08 — forked from ninnemana/main.go
Imports Part Images into Aries Database
package main
import (
"database/sql"
"fmt"
_ "github.com/go-sql-driver/mysql"
"log"
"net/http"
"strconv"
"strings"
@mickelsonm
mickelsonm / tmp.js
Created October 22, 2014 15:03
tmp
/**
* Contact controller definition
*/
define(['./module'], function (module) {
'use strict';
module.controller('ContactController', ['$scope', 'GeographyService', 'FormService', function(scope, GeographyService, FormService){
GeographyService.GetCountryStates(function(countries, err){
if(err){
console.log(err);
/** Book **/
/** "ff-good-headline-web-pro-con-n4", "ff-good-headline-web-pro-con" **/
font-family: "ff-good-headline-web-pro-con-n4","ff-good-headline-web-pro-con",sans-serif;
font-style: normal;
font-weight: 400;
/** Book Italic **/
/** "ff-good-headline-web-pro-con-i4", "ff-good-headline-web-pro-con" **/
font-family: "ff-good-headline-web-pro-con-i4","ff-good-headline-web-pro-con",sans-serif;
font-style: italic;
<div class="outterbox" style="position: relative;">
<img src="/img/truck.png" alt="Truck Grill Guards" class="img-responsive">
<div class="innerbox" style="background: none repeat scroll 0 0; top: 0; left: 0; position: absolute;">
<h1 style="margin-left: auto; margin-right: auto; text-align: center;">A NEW ERA IN GRILL GUARDS IS HERE</h1>
</div>
</div>
@mickelsonm
mickelsonm / xml-parsing.go
Last active August 29, 2015 14:07
Golang XML Parsing Example - http://play.golang.org/p/Qewm4sEoZ6
package main
import(
"encoding/xml"
"fmt"
"strings"
)
var text = `
<people>