This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First, we need to find our device. BEFORE inserting your USB drive, run the | |
# following: | |
diskutil list | |
# This will output a bunch of info about all of the disk drives connected to | |
# your Mac. Each entry will have a header in the form "/dev/diskX", where X is | |
# some number starting at 0. Now, insert your USB drive and run the command | |
# again. You should see a new entry. Make note of the name (ie, /dev/diskX). | |
diskutil list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func logger(prefix string, h http.Handler) http.HandlerFunc { | |
return func(w http.ResponseWriter, r *http.Request) { | |
// Save a copy of this request for debugging. | |
requestDump, err := httputil.DumpRequest(r, false) | |
if err != nil { | |
log.Println(err) | |
} | |
log.Println(prefix, string(requestDump)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<config> | |
<modules> | |
<MyModule_ImportCustomers> | |
<version>0.1.0</version> | |
</MyModule_ImportCustomers> | |
</modules> | |
<global> | |
<helpers> | |
<MyModule_ImportCustomers> | |
<class>MyModule_ImportCustomers_Helper</class> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var getKeys = function(obj){ | |
var keys = []; | |
for(var key in obj){ | |
keys.push(key); | |
} | |
return keys; | |
} | |
function checkRequest(r) { | |
console.log(r); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"fmt" | |
"log" | |
"os" | |
"github.com/robertkrimen/otto" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package httpclient | |
import ( | |
"net" | |
"net/http" | |
"time" | |
) | |
type Config struct { | |
ConnectTimeout time.Duration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"sync" | |
) | |
// *************************** | |
type Worker chan struct{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"sync" | |
) | |
type List struct { | |
sync.Mutex | |
chans []chan struct{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import( | |
"log" | |
"net/url" | |
"net/http" | |
"net/http/httputil" | |
) | |
func main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"os" | |
"fmt" | |
"runtime" | |
) | |
type Fetcher interface { | |
// Fetch returns the body of URL and |
NewerOlder