Skip to content

Instantly share code, notes, and snippets.

View timbogit's full-sized avatar

Tim Schmelmer timbogit

View GitHub Profile
@timbogit
timbogit / linkedin_tim.json
Last active July 7, 2023 22:56
Proxycurl API response for LinkedIn
{
"public_identifier": "timschmelmer",
"profile_pic_url": "https://media.licdn.com/dms/image/C4E03AQErCOo6ex2AgQ/profile-displayphoto-shrink_200_200/0/1517666803904?e=1694044800&v=beta&t=I9NSu4ipTA_mjnSCAVfK_hLb7tgy8EObwSjhERvW7wk",
"background_cover_image_url": null,
"first_name": "Tim",
"last_name": "Schmelmer",
"full_name": "Tim Schmelmer",
"follower_count": null,
"occupation": "Software Architect at Salesforce",
"headline": "Software Architect at Salesforce",
@timbogit
timbogit / soa_workshop_script.md
Last active February 16, 2016 23:26
Script for the actual "workshop" part of the Rocky Mountain Ruby 2014

Rocky Mountain Ruby

SOA from the Start - Workshop Part


What will we show

We are building a set of applications that have will show deals (aka. 'inventory items') available in or near a given city. These items can also be organized by a 'category' (aka. tags), to cater to the various customers' areas of interest.

To bootstrap things, and to get us focussed on some key areas of developing in a SOA, we have gone ahead and built these apps out at varying stages. The workshops will focus on showing some of this code, and intersperse exercises to add features, or to refactor.

@timbogit
timbogit / go_challenge_works.go
Created November 1, 2013 16:46
Working variadic function with interfaces as arguments
package main
import (
"fmt"
)
type TestStruct struct {
int
string
}
@timbogit
timbogit / go_challenge_error.go
Last active December 27, 2015 04:39
Variadic function of interfaces called with a string slice
package main
import (
"fmt"
)
type TestStruct struct {
int
string
}
@timbogit
timbogit / for-select.go
Created August 8, 2013 06:10
for-select loop for a feed reader as presented in "Advanced Go Concurrency Patterns" (Sameer Ajmani, Google I/O 2013)
func (s *sub) loop() {
var pending []Item // appended by fetch; consumed by send
var next time.Time // initially January 1, year 0
var err error // set when Fetch fails
for {
var first Item
var updates chan Item
if len(pending) > 0 {
first = pending[0]
@timbogit
timbogit / bintree_ex.go
Created May 9, 2013 03:28
Go lang tour exercise around Equivalent Binary Trees
package main
import (
"code.google.com/p/go-tour/tree"
"fmt"
)
// Walk walks the tree t sending all values
// from the tree to the channel ch.
func Walk(t *tree.Tree, ch chan int) {
@timbogit
timbogit / http_server_ex.go
Created May 8, 2013 03:49
Go tour HTTP Server exercise
package main
import (
"fmt"
"net/http"
)
type String string
@timbogit
timbogit / cubic_root_ex.go
Created May 7, 2013 15:13
Cubic Root exercise for Go lang tour
package main
import (
"fmt"
"math/cmplx"
)
func Cbrt(x complex128) complex128 {
z := complex128(1)
for i := 0; i < 100; i++ {
@timbogit
timbogit / maps_ex.go
Created May 7, 2013 04:01
Maps exercise in Go tour
package main
import (
"code.google.com/p/go-tour/wc"
"strings"
)
func WordCount(s string) map[string]int {
res := make(map[string]int)
@timbogit
timbogit / slice_ex.go
Last active December 17, 2015 01:19
Go exercise for "Slices"
package main
import "code.google.com/p/go-tour/pic"
func Pic(dx, dy int) [][]uint8 {
// allocate 'dy' row slices of []unit8
rows := make([][]uint8, dy)
for i, row := range rows {
// allocate 'dx' uint8 points in each row
row = make([]uint8, dx)