Skip to content

Instantly share code, notes, and snippets.

Avatar

Erez Yalon ErezYalon

  • Checkmarx
View GitHub Profile
View server.go
package main
import "net/http"
import "fmt"
import "log"
import "io/ioutil"
import "strconv"
const VISITS_COUNTER_FILE = "/tmp/visits-counter"
View server-fixed.go
package main
import "net/http"
import "fmt"
import "log"
import "io/ioutil"
import "strconv"
import "sync"
const VISITS_COUNTER_FILE = "/tmp/visits-counter"
View server-alternative.go
package main
import "net/http"
import "fmt"
import "log"
var visistsCounter uint64 = 0;
func updateVisitsCounter () uint64 {
visistsCounter++
View concurrent-requests.go
package main
import (
"fmt"
"os"
"net/http"
"time"
"io/ioutil"
"strconv"
)
View gist:556c6c9b004d0dc8531eb4a53696ee53
Verifying that "erez.id" is my Blockstack ID. https://onename.com/erez