Spin up three m3.medium
EC2 ubuntu 14.04
instances with public DNS enabled and configure them for high network traffic by increasing these limits:
Added fs.file-max=80000
to /etc/sysctl.conf
Added the following lines to /etc/security/limits.conf
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 ( | |
"encoding/json" | |
"flag" | |
"github.com/PuerkitoBio/goquery" | |
"github.com/pmylund/go-cache" | |
"io/ioutil" | |
"log" | |
"net/http" |
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" | |
"reflect" | |
) | |
type mapf func(interface{}) interface{} | |
func Map(in interface{}, fn mapf) interface{} { |
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 ( | |
"flag" | |
"encoding/json" | |
"github.com/PuerkitoBio/goquery" | |
"io/ioutil" | |
"net/http" | |
"strconv" | |
) |
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" | |
"math" | |
"strconv" | |
) | |
func Round(input float64, places int) (rounded float64) { | |
if math.IsNaN(input) { |
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/env fish | |
# Ubuntu Message of The Day | |
if test -f /etc/update-motd.d/* | |
chmod -x /etc/update-motd.d/* | |
end | |
# Fish Shell Greeting | |
set line1 "# Don't Show Fish Greeting" | |
set line2 "set --erase fish_greeting" |
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" | |
) | |
const fizz string = "Fizz" | |
const buzz string = "Buzz" | |
func fizzbuzz(cnt chan int, msg chan string) { |