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
(function(){ | |
// Set this to be the time you want the button clicked at | |
var click_at = 1; | |
// Convert click_at to milliseconds. | |
// Thanks to http://www.reddit.com/user/rec0rder for the fact that | |
// the button always rounds the ms up to get your click time. | |
click_at *= 1000; | |
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
// Compare to code at https://blog.merovius.de/2017/06/18/how-not-to-use-an-http-router.html | |
package main | |
import ( | |
"log" | |
"net/http" | |
"github.com/go-util/router" | |
) |
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/http" | |
) | |
func main() { | |
go func() { | |
log.Println(http.ListenAndServe("127.0.0.1:8111", mux)) |