I hereby claim:
- I am alexleone on github.
- I am alexleone (https://keybase.io/alexleone) on keybase.
- I have a public key ASCE8JS6bXUVaKwvEoKEuomm8ull5FBVy2egoI1l_FISNAo
To claim this, I am signing this object:
(function (window) { | |
function CookieHelper() { | |
} | |
// utility function to retrieve an expiration date in proper | |
// format; pass three integer parameters for the number of days, hours, | |
// and minutes from now you want the cookie to expire (or negative | |
// values for a past date); all three parameters are required, | |
// so use zeros where appropriate |
I hereby claim:
To claim this, I am signing this object:
DROP SCHEMA public CASCADE; | |
CREATE SCHEMA public; | |
/* Replace 'postgres' with the database name you are working in */ | |
GRANT ALL ON SCHEMA public TO postgres; | |
GRANT ALL ON SCHEMA public TO public; |
# Note the current urls to later be used in DB update | |
# use the flag --allow-root if only have a root user | |
wp option get siteurl | |
wp option get home --allow-root | |
wp option update home 'https://example.com' | |
wp option update siteurl 'https://example.com' | |
# Search and replace all the old urls to reference the new one | |
wp search-replace 'http://example.test' 'http://example.com' |
# Find the repo | |
sudo add-apt-repository ppa:certbot/certbot | |
sudo apt-get update | |
# Get cert bot | |
sudo apt-get install python-certbot-apache | |
# The certbot Let’s Encrypt client is now ready to use. | |
# Setup cert for one domain |
// Intersection | |
let intersection = arr1.filter(x => arr2.includes(x)); | |
// For [1,2,3] [2,3] it will yield [2,3]. On the other hand, for [1,2,3] [2,3,5] will return the same thing. | |
// Difference | |
let difference = arr1.filter(x => !arr2.includes(x)); | |
// For [1,2,3] [2,3] it will yield [1]. On the other hand, for [1,2,3] [2,3,5] will return the same thing. | |
// For a symmetric difference, you can do: | |
let difference = arr1 |
# Remove all docker images matching pattern | |
docker images -a | grep "pattern" | awk '{print $3}' | xargs docker rmi | |
# Force remove all docker images matching pattern | |
docker images -a | grep "pattern" | awk '{print $3}' | xargs docker rmi -f | |
# List all images | |
docker images -a | |
# Remove all imaages | |
docker rmi $(docker images -a -q) |
macbook$ sudo killall -HUP mDNSResponder;sudo killall mDNSResponderHelper;sudo dscacheutil -flushcache |
# basic usage | |
diskutil eraseDisk FILE_SYSTEM DISK_NAME DISK_IDENTIFIER | |
#Formatting a Disk to Mac OS Extended Journaled (JHFS+) from Terminal in Mac OS X | |
diskutil eraseDisk JHFS+ DiskName /dev/DiskNodeID | |
#Formatting a Disk to Mac OS Extended (HFS+) from Terminal in Mac OS X | |
diskutil eraseDisk HFS+ DiskName /dev/DiskNodeID | |
#Formatting a Disk to MS-DOS fat32 from the Command Line in Mac OS X | |
diskutil eraseDisk FAT32 DiskName /dev/DiskNodeID | |
#Formatting a Disk to ExFAT from the Command Line in Mac OS X | |
diskutil eraseDisk ExFAT DiskName /dev/DiskNodeID |