I hereby claim:
- I am ammario on github.
- I am ammar (https://keybase.io/ammar) on keybase.
- I have a public key ASCHuUmMssaRVYYIHqKdvCGN7rrhbz5qlq3vzZJF3ZU0EAo
To claim this, I am signing this object:
package main | |
import ( | |
"github.com/stratexio/gclog" | |
"golang.org/x/net/context" | |
"google.golang.org/cloud" | |
"google.golang.org/cloud/storage" | |
) | |
#!/bin/bash | |
set -euf -o pipefail | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" | |
exit 1 | |
fi | |
rm -rf /usr/local/go || true | |
rm /usr/local/bin/go || true |
func ip2int(ip net.IP) uint32 { | |
if len(ip) == 16 { | |
return binary.BigEndian.Uint32(ip[12:16]) | |
} | |
return binary.BigEndian.Uint32(ip) | |
} | |
func int2ip(nn uint32) net.IP { | |
ip := make(net.IP, 4) | |
binary.BigEndian.PutUint32(ip, nn) |
I hereby claim:
To claim this, I am signing this object:
package main | |
import ( | |
"database/sql" | |
_ "github.com/go-sql-driver/mysql" | |
) | |
func main() { | |
mysqlConn, err := sql.Open("mysql", os.Getenv("MYSQL_USER")+":"+os.Getenv("MYSQL_PASS")+"@("+os.Getenv("MYSQL_HOST")+")/"+os.Getenv("MYSQL_DB") + "?parseTime=true") | |
if err != nil { |
func cError(c *gin.Context, err interface{}) { | |
switch err.(type) { | |
case error: | |
c.JSON(200, gin.H{ | |
"error": err.(error).Error(), | |
}) | |
case string: | |
c.JSON(200, gin.H{ | |
"error": err.(string), | |
}) |
//Removed in favor of https://github.com/ammario/temp |
I hereby claim:
To claim this, I am signing this object: