These are the standard commands:
gpgconf --list-dirs
gpgconf --kill gpg-agent
gpgconf --reload gpg-agent
<?php | |
// PHP memory limit for this site | |
define( 'WP_MEMORY_LIMIT', '128M' ); | |
define( 'WP_MAX_MEMORY_LIMIT', '256M' ); // Increase admin-side memory limit. | |
// Database | |
define( 'WP_ALLOW_REPAIR', true ); // Allow WordPress to automatically repair your database. | |
define( 'DO_NOT_UPGRADE_GLOBAL_TABLES', true ); // Don't make database upgrades on global tables (like users) | |
// Explicitely setting url |
#!/usr/bin/env bash | |
# The script installs Dotfiles on a system managed by Git Bare Repository technique. | |
# The inspiration of this script and management of dotfiles comes from | |
# @see https://www.atlassian.com/git/tutorials/dotfiles | |
# The code below is taken from here with some modification | |
RED="\033[31m" | |
GREEN="\033[32m" |
1.) Download a Nerd Font
2.) Unzip and copy to ~/.fonts
3.) Run the command fc-cache -fv
to manually rebuild the font cache
Woocommerce Subscription WP CLI Cheatsheet | |
Reviews | |
Enable Reviews on all | |
wp db query 'UPDATE wp_posts SET comment_status="open" WHERE post_type="product" AND comment_status="closed"' | |
Query disabled reviews | |
wp db query 'SELECT ID FROM wp_posts WHERE post_type="product" AND comment_status="closed" AND post_status="publish"' |
import gzip | |
import json | |
import requests | |
try: | |
from cStringIO import StringIO | |
except: | |
from StringIO import StringIO | |
# Let's fetch the Common Crawl FAQ using the CC index | |
resp = requests.get('http://index.commoncrawl.org/CC-MAIN-2015-27-index?url=http%3A%2F%2Fcommoncrawl.org%2Ffaqs%2F&output=json') |
# ECDSA using P-384 and SHA-384 (NIST curve, part of CNSA Suite, and approved to protect "top secret" systems) | |
# https://apps.nsa.gov/iaarchive/library/ia-guidance/ia-solutions-for-classified/algorithm-guidance/commercial-national-security-algorithm-suite-factsheet.cfm | |
# https://tools.ietf.org/html/rfc7518#section-3.4 | |
# Generate private key | |
openssl ecparam -name secp384r1 -genkey -noout -out jwtES384key.pem | |
# Generate public key | |
openssl ec -in jwtES384key.pem -pubout -out jwtES384pubkey.pem |
#!/bin/sh | |
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
# CREATE block and create them in separate commands _after_ all the INSERTs. | |
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
# The mysqldump file is traversed only once. | |
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |