Skip to content

Instantly share code, notes, and snippets.

View jebrial's full-sized avatar
📡
searching for life

Gabe Dalay jebrial

📡
searching for life
View GitHub Profile
@jebrial
jebrial / postgres-brew.md
Created July 19, 2020 01:54 — forked from ibraheem4/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@jebrial
jebrial / git-auto-sign-commits.sh
Created December 5, 2019 15:48 — forked from mort3za/git-auto-sign-commits.sh
Auto sign your git commits
# Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands)
gpg --gen-key
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null`
# check current keys:
gpg --list-secret-keys --keyid-format LONG
# See your gpg public key:
gpg --armor --export YOUR_KEY_ID
# YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333)
@jebrial
jebrial / gist:a0c85ecc8db24ebed93b9f9d7d4e69c1
Created December 4, 2019 23:06
Overwrite commit author for commits of a specific branch starting from a specific commit
git rebase --onto COMMIT_HASH_BEFORE_FIRST_TO_OVERWRITE --exec "git commit --amend --author=\"Author Name <user@email.com>\"" COMMIT_HASH_BEFORE_FIRST_TO_OVERWRITE
@jebrial
jebrial / remove_mcafee.md
Created August 22, 2019 21:13 — forked from pjobson/remove_mcafee.md
OSX McAfee Removal

Removal of McAfee from OSX

Note: This was written in 2015, it may be out of date now.

There are a lot of commands here which I use sudo if you don't know what you're doing with sudo, especially where I rm you can severely screw up your system.

There are many reasons which you would want to remove a piece of software such as McAfee, such as not wanting it to hammer your CPU during work hours which seems like primetime for a virus scan.

I intend this to be a living document, I have included suggestions from peoples' replies.

# Base dirs
SRC_DIR = src
TMP_DIR = tmp
DEV_DIR = dev
SRC_PUBLIC_DIR := $(SRC_DIR)/public
SRC_STYLES_DIR := $(SRC_DIR)/styles
SRC_SCRIPTS_DIR := $(SRC_DIR)/scripts
TMP_SCRIPTS_DIR := $(TMP_DIR)/scripts
DEV_PUBLIC_DIR := $(DEV_DIR)/public
DEV_STYLES_DIR := $(DEV_DIR)/styles
// https://twitter.com/jake_albaugh/status/1118611365508337665
function z() {
setTimeout(z, 40);
a.getByteFrequencyData(d);
var s = [];
d.forEach(v => s.push(l[Math.floor((v / 255) * 8)]));
location.hash = document.title = s.join("");
}
# Video: http://rubyhoedown2008.confreaks.com/08-chris-wanstrath-keynote.html
Hi everyone, I'm Chris Wanstrath.
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But
then I took a few moments and thought, Wait, why? Why me? What am I supposed
to say that's interesting? Something about Ruby, perhaps. Maybe the
future of it. The future of something, at least. That sounds
keynote-y.

Keybase proof

I hereby claim:

  • I am jebrial on github.
  • I am jebrial (https://keybase.io/jebrial) on keybase.
  • I have a public key ASAtILXc9GpLFgnoDZv9IKLj-UMXgagIy-nzivBD4gcBigo

To claim this, I am signing this object:

@jebrial
jebrial / sanic_wrk_osx.py
Last active November 28, 2017 22:16
Sanic simple benchmark
"""
Running Sanic local on osx high Sierra:
wrk -t12 -c400 -d30s http://0.0.0.0:5000
Running 30s test @ http://0.0.0.0:5000
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 128.82ms 42.87ms 260.89ms 59.30%
Req/Sec 246.53 93.91 686.00 71.81%
87926 requests in 30.10s, 10.73MB read
@jebrial
jebrial / flask_wrk_osx.py
Last active November 28, 2017 22:15
Flask simple benchmark
"""
Running Flask local on osx high Sierra:
wrk -t12 -c400 -d30s http://127.0.0.1:5000Running 30s test @ http://127.0.0.1:5000
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 180.97ms 54.38ms 703.26ms 90.93%
Req/Sec 56.94 30.42 272.00 75.13%
16484 requests in 30.10s, 2.69MB read
Socket errors: connect 0, read 1520, write 25, timeout 0