This file contains hidden or 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
#!/usr/bin/perl | |
$mirror = "nz.archive.ubuntu.com"; | |
#$mirror = "us.archive.ubuntu.com"; | |
# For Cape Town | |
#$mirror = "ubuntu.saix.net/ubuntu-archive"; | |
$| = 1; | |
while (<>) { | |
@line = split; |
This file contains hidden or 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
# listen on 127.0.0.1 so that apt on the host machine can use the cache | |
http_port 127.0.0.1:8888 | |
# listen on lxdbr0 addresses | |
http_port 10.0.8.1:8888 | |
http_port [fdc1:e6b1:6aac:99f5::1]:8888 | |
acl allowed_src_networks src "/etc/squid-deb-proxy/autogenerated/allowed-networks-src.acl" | |
acl blockedpkgs urlpath_regex "/etc/squid-deb-proxy/autogenerated/pkg-blacklist-regexp.acl" |
This file contains hidden or 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 ( | |
"fmt" | |
// Swap these 2 for comparison. Under Go 1.6 the program works | |
// with json but not yaml. | |
"gopkg.in/yaml.v2" | |
// yaml "encoding/json" | |
) |
This file contains hidden or 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 foo | |
import "fmt" | |
func NewThing() *Thing { | |
return &Thing{ | |
Name: "Thing", | |
other: make(other), | |
} | |
} |
This file contains hidden or 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 Download(out chan string, urls... string) { | |
for url := range(urls) { | |
go func() { | |
out <- HttpGet(url) | |
}() | |
} | |
} | |
func Process(in chan string) { | |
select { |
NewerOlder