Skip to content

Instantly share code, notes, and snippets.

View michaelBenin's full-sized avatar
🏠
Remote

Michael Benin michaelBenin

🏠
Remote
View GitHub Profile
@michaelBenin
michaelBenin / twitter.js
Created September 9, 2020 13:19
home page is twitters search for people you follow's tweets not garbage
document.querySelectorAll('[href="/home"]').forEach((el) => el.setAttribute('href', '/search?q=filter%3Afollows%20-filter%3Areplies&src=typed_query&f=live'))
@michaelBenin
michaelBenin / psql-with-gzip-cheatsheet.sh
Created April 6, 2020 13:40 — forked from brock/psql-with-gzip-cheatsheet.sh
Exporting and Importing Postgres Databases using gzip
# This is just a cheat sheet:
# On production
sudo -u postgres pg_dump database | gzip -9 > database.sql.gz
# On local
scp -C production:~/database.sql.gz
dropdb database && createdb database
gunzip < database.sql.gz | psql database
### Keybase proof
I hereby claim:
* I am michaelbenin on github.
* I am michaelbenin (https://keybase.io/michaelbenin) on keybase.
* I have a public key ASAm521_UY1mXXRAlSjnjiB8Om13_Bp08MsI2aT7W2mHywo
To claim this, I am signing this object:
@michaelBenin
michaelBenin / corona_virus.json
Last active March 2, 2020 19:35
Corona Virus JSON
[
{
"fips": 1001,
"state": "AL",
"area_name": "Autauga County",
"confirmedCases": 0
},
{
"fips": 1003,
"state": "AL",
@michaelBenin
michaelBenin / gist:4c068e050879dba4c19357be0f5dbd46
Created January 20, 2020 16:29
How to get Titan Key working on Ubuntu 16.04
# Found originally on: https://forum.mxlinux.org/viewtopic.php?t=53180
sudo apt update
sudo apt install libu2f-host0
sudo -v; wget https://github.com/Yubico/libu2f-host/raw/master/70-u2f.rules -O- | sudo tee /etc/udev/rules.d/70-yubico-u2f.rules
sudo udevadm control --reload-rules
sudo udevadm trigger
@michaelBenin
michaelBenin / gist:baa9a94a2353c0e35d71bfba7045e4ea
Created June 23, 2019 19:43 — forked from spalger/gist:6417923
Inject jQuery and lodash into the current tab via a bookmarklet. To use, just create a new bookmark and use this as the URL.
javascript: (function () {
var el = document.createElement('pre'),
b = document.getElementsByTagName('body')[0],
otherjQuery = false,
msg = '',
libs = [
function loadjQuery() {
if (typeof jQuery != 'undefined') {
showMsg('This page already using jQuery v' + jQuery.fn.jquery);
} else {
@michaelBenin
michaelBenin / utc_timezone.json
Created March 27, 2018 14:01
list of all utc timezones sorted
[
"MST7MDT",
"PST8PDT",
"Etc/GMT",
"EST5EDT",
"CST6CDT",
"Etc/GMT-1",
"Etc/GMT-8",
"Etc/GMT-7",
"Etc/GMT-6",
[{"Type":"language","Subtag":"aa","Description":"Afar","Added":"2005-10-16"},{"Type":"language","Subtag":"ab","Description":"Abkhazian","Added":"2005-10-16","Suppress-Script":"Cyrl"},{"Type":"language","Subtag":"ae","Description":"Avestan","Added":"2005-10-16"},{"Type":"language","Subtag":"af","Description":"Afrikaans","Added":"2005-10-16","Suppress-Script":"Latn"},{"Type":"language","Subtag":"ak","Description":"Akan","Added":"2005-10-16","Scope":"macrolanguage"},{"Type":"language","Subtag":"am","Description":"Amharic","Added":"2005-10-16","Suppress-Script":"Ethi"},{"Type":"language","Subtag":"an","Description":"Aragonese","Added":"2005-10-16"},{"Type":"language","Subtag":"ar","Description":"Arabic","Added":"2005-10-16","Suppress-Script":"Arab","Scope":"macrolanguage"},{"Type":"language","Subtag":"as","Description":"Assamese","Added":"2005-10-16","Suppress-Script":"Beng"},{"Type":"language","Subtag":"av","Description":"Avaric","Added":"2005-10-16"},{"Type":"language","Subtag":"ay","Description":"Aymara","Adde
@michaelBenin
michaelBenin / example.py
Created February 24, 2018 04:22
Bluebird's Promise.map in python
'''Debugging: https://docs.python.org/3/library/asyncio-dev.html#asyncio-dev'''
def fetch_urls_concurrent(urls):
loop = asyncio.new_event_loop()
resp_list = []
async def async_req_urls():
'''Change max workers for concurrency'''
with concurrent.futures.ThreadPoolExecutor(max_workers=20) as executor:
futures = []
about:blank:1 Mixed Content: The page at 'https://www.fastcompany.com/40484989/amazon-should-put-its-new-headquarters-in-puerto-rico' was loaded over HTTPS, but requested an insecure image 'http://tags.bluekai.com/site/1407?partner=1&uhint=na_id=2016091808381073644101408625&redir=http%3A%2F%2Fe.nexac.com%2Fe%2Fbk_sync.xgi%3Fna_exid%3D%24_BK_UUID'. This content should also be served over HTTPS.
about:blank:1 Mixed Content: The page at 'https://www.fastcompany.com/40484989/amazon-should-put-its-new-headquarters-in-puerto-rico' was loaded over HTTPS, but requested an insecure image 'http://cm.g.doubleclick.net/pixel?google_nid=datalogix_dmp&google_cm'. This content should also be served over HTTPS.
about:blank:1 Mixed Content: The page at 'https://www.fastcompany.com/40484989/amazon-should-put-its-new-headquarters-in-puerto-rico' was loaded over HTTPS, but requested an insecure image 'http://e.nexac.com/e/googlegdn_sync.xgi?na_exid=CAESEOM-jIkZzPAqKkCx0z7_SWk&google_cver=1'. This content should also be served ov