I hereby claim:
- I am ammarpw on github.
- I am ammar (https://keybase.io/ammar) on keybase.
- I have a public key whose fingerprint is ADF9 EF5C AF59 5200 DC76 B4FF 1C0F 6A4C 777E 4FE4
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
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), | |
}) |
I hereby claim:
To claim this, I am signing this object:
//Removed in favor of https://github.com/ammario/temp |
package main | |
import ( | |
"github.com/stratexio/gclog" | |
"golang.org/x/net/context" | |
"google.golang.org/cloud" | |
"google.golang.org/cloud/storage" | |
) | |
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 { |
#!/bin/bash | |
yum -y install httpd php php-mysql mariadb mariadb-server wget | |
sed -i 's/Listen 80/Listen 8080/g' /etc/httpd/conf/httpd.conf | |
service httpd restart | |
service mariadb restart | |
mkdir -p /var/www/html/ | |
wget -O /var/www/html/adminer.php https://www.adminer.org/static/download/4.2.5/adminer-4.2.5-mysql.php |
178.63.211.58 | |
198.50.152.135 | |
144.217.94.65 | |
213.32.53.176 | |
145.239.232.114 | |
80.218.217.199 | |
78.24.235.244 | |
213.32.53.176 | |
167.99.229.57 | |
51.38.99.97 |
#!/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 |