Skip to content

Instantly share code, notes, and snippets.

View MariuszKogut's full-sized avatar
🎯
Working smart... ;-)

Mariusz Kogut MariuszKogut

🎯
Working smart... ;-)
View GitHub Profile
@AlexZeitler
AlexZeitler / fetch-disposable-email-domains-and-write-to-postgres.sh
Last active November 24, 2023 07:27
Throw away / disposable email domain list with Postgres import
#!/bin/bash
# download the files
curl -o file1.txt https://gist.githubusercontent.com/ammarshah/f5c2624d767f91a7cbdc4e54db8dd0bf/raw/660fd949eba09c0b86574d9d3aa0f2137161fc7c/all_email_provider_domains.txt
curl -o file2.js.txt https://gist.githubusercontent.com/Evavic44/8348e357935d09f79d4c1616b0c20408/raw/72996e053cbaf39de9cf16d304d2c237184f96d2/domain.js
curl -o file3.txt https://raw.githubusercontent.com/disposable/disposable-email-domains/master/domains.txt
# remove first and last line, remove quotes, commas and spaces
sed -e '1d;$d' file2.js.txt | awk '{ gsub(/["\, ]/, ""); print }' > file2.txt
@JamesMessinger
JamesMessinger / IndexedDB101.js
Last active May 19, 2024 18:56
Very Simple IndexedDB Example
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB;
// Open (or create) the database
var open = indexedDB.open("MyDatabase", 1);
// Create the schema
open.onupgradeneeded = function() {
var db = open.result;
var store = db.createObjectStore("MyObjectStore", {keyPath: "id"});