Skip to content

Instantly share code, notes, and snippets.

@mobleyc
mobleyc / http_get.go
Created October 5, 2015 01:06
Creating a custom HTTP Transport and Client with Go
package main
import (
"fmt"
"io/ioutil"
"net"
"net/http"
"os"
"time"
)
@mobleyc
mobleyc / google_search.go
Created October 5, 2015 01:10
Go Concurrency Patterns
package main
import (
"fmt"
"math/rand"
"time"
)
// Examples from https://talks.golang.org/2012/concurrency.slide, starting at slide 42, https://talks.golang.org/2012/concurrency.slide#42
var (
Web = fakeSearch("web")
@mobleyc
mobleyc / app.java
Created March 25, 2016 18:24
Loading resource bundles in Java from property files outside of classpath, with different file extensions.
package com.cpm;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.Locale;
import java.util.PropertyResourceBundle;