Skip to content

Instantly share code, notes, and snippets.

View Just4Ease's full-sized avatar
😍
Architecting Madness

⚡️Justice Nefe⚡️ Just4Ease

😍
Architecting Madness
View GitHub Profile
@da-n
da-n / gist:9998623
Created April 5, 2014 22:01
Rename a tag in git

Rename a git tag old to new:

git tag new old
git tag -d old
git push origin :refs/tags/old
git push --tags

The colon in the push command removes the tag from the remote repository. If you don't do this, git will create the old tag on your machine when you pull.

-- source http://stackoverflow.com/a/5719854/695454

@josiahcarlson
josiahcarlson / rate_limit.py
Last active February 25, 2022 14:33
Rate limiting with Redis primarily using Lua scripting
'''
rate_limit.py
Written May 7-8, 2014 by Josiah Carlson
Released under the MIT license.
Offers a simple interface for offering rate limiting on a per second, minute,
hour, and day basis. Useful for offering varying rate limits depending on user
behavior. Sliding window based limits offer per minute, hour, and day limits
@evalphobia
evalphobia / atoi_test.go
Last active February 13, 2023 16:12
golang benchmark: String and Int conversions
package bench
import (
"strconv"
"testing"
)
var smallStr = "35"
var bigStr = "999999999999999"
@CraigChilds94
CraigChilds94 / color.go
Last active January 27, 2024 15:39
Hex to RGB conversion in Go
package main
import (
"fmt"
"strconv"
)
type Hex string
type RGB struct {
@jun06t
jun06t / vault-golang-login
Created July 13, 2018 15:56
Golang Vault Login Sample
package main
import (
"encoding/json"
"fmt"
"net/http"
"time"
"github.com/hashicorp/vault/api"
"github.com/hashicorp/vault/builtin/credential/aws"
@tokyoneon
tokyoneon / apfs_brute.sh
Created April 20, 2019 07:25
Brute Force FileVault Protected Partitions
#!/bin/bash
# https://null-byte.wonderhowto.com/how-to/hacking-macos-break-into-macbook-encrypted-with-filevault-0185177/
# checks to ensure all 3 args are present
if [[ ! $3 ]]; then
echo -e "\nusage: $ ./script.sh /dev/sdaX passwords.list -killswitch\n"
exit 0
fi
# Config
GC_PROJECT=your-gcp-project-id
GC_PROJECT_NUMBER=your-gcp-project-number
# Grant the Cloud Run Admin role to the Cloud Build service account
gcloud projects add-iam-policy-binding $GC_PROJECT \
--member "serviceAccount:$GC_PROJECT_NUMBER@cloudbuild.gserviceaccount.com" \
--role roles/run.admin
# Grant the IAM Service Account User role to the Cloud Build service account on the Cloud Run runtime service account
@Just4Ease
Just4Ease / atoi_test.go
Created July 24, 2021 16:37 — forked from evalphobia/atoi_test.go
golang benchmark: String and Int conversions
package bench
import (
"strconv"
"testing"
)
var smallStr = "35"
var bigStr = "999999999999999"