Skip to content

Instantly share code, notes, and snippets.

View ammario's full-sized avatar
🌠

Ammar Bandukwala ammario

🌠
View GitHub Profile
@ammario
ammario / goto.json
Created January 15, 2024 22:11
goto statements in Go stdlib
[
{
"directory": "src/syscall",
"count": 119
},
{
"directory": "src/runtime",
"count": 93
},
{
@ammario
ammario / sarif.json
Created August 23, 2023 14:13
sarif example
{
"version": "2.1.0",
"$schema": "https://json.schemastore.org/sarif-2.1.0-rtm.5.json",
"runs": [
{
"tool": {
"driver": {
"informationUri": "https://jfrog.com/xray/",
"name": "JFrog Xray",
"rules": [
@ammario
ammario / template.tf
Created June 22, 2022 04:46
GCP GPU VM template
terraform {
required_providers {
coder = {
source = "coder/coder"
version = "0.3.4"
}
google = {
source = "hashicorp/google"
version = "~> 4.15"
}
@ammario
ammario / install_go.sh
Last active February 5, 2022 02:18
Install Go
VERSION="go1.18beta2"
OS="darwin"
ARCH="amd64"
sudo rm -rf /usr/local/bin/go /usr/local/go
curl https://storage.googleapis.com/golang/$VERSION.$OS-$ARCH.tar.gz | sudo tar -C /usr/local -xzf -
sudo ln -s /usr/local/go/bin/go /usr/local/bin/go
@ammario
ammario / bench.sh
Last active October 22, 2021 17:49
Run Geekbench on a Linux computer
#!/bin/bash
pushd /tmp
curl https://cdn.geekbench.com/Geekbench-5.4.1-Linux.tar.gz | tar -xzvf -
pushd Geekbench-5.4.1-Linux/
./geekbench_x86_64 | tee geekbench.log
popd
popd
@ammario
ammario / mining-pool-blacklist.txt
Created February 2, 2019 01:22
Mining Pool IP Blacklist
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
@ammario
ammario / README.md
Last active December 11, 2018 19:23
gometalinter goland instructions

Use this File Watcher configuration for gometalinter errors to appear as squiggles in your IDE.

Arguments

--vendor --fast --enable-gc --tests --aggregate --disable=gotype $FileDir$ --format="{{.Path}}:{{.Line}}: {{.Message}}"

Output filters

$FILE_PATH$:$LINE$:$MESSAGE$

@ammario
ammario / install_adminer.sh
Last active January 12, 2017 16:58
Install Adminer w/ Apache
#!/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
@ammario
ammario / install_go_latest.sh
Last active July 13, 2023 15:14
Install latest go CentOS
#!/bin/bash
set -e
sudo yum -y install wget git
wget -O /tmp/go.tar.gz https://storage.googleapis.com/golang/go1.10.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf /tmp/go.tar.gz
ln -s /usr/local/go/bin/go /usr/bin/go
# Install glide
export GOPATH=~/go
mkdir -p ~/go/bin
@ammario
ammario / goth
Created September 2, 2016 16:27
golang test coverage html
#!/bin/bash
go test -coverprofile=coverage.out
go tool cover -html=coverage.out