-
Set the hostname of the server
hostnamectl set-hostname johnsmith
-
Make the hostname resolvable. Open the file /etc/hosts in your favourite editor and assign the IPv4 & IPv6 records of the server to your chosen hostname & FQDN.
127.0.0.1 localhost.localdomain localhost
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ { | |
expires 30d; | |
add_header Pragma public; | |
add_header Cache-Control "public"; | |
} | |
# Uncomment one of the lines below for the appropriate caching plugin (if used). | |
#include snippets/wordpress-wp-super-cache.conf; | |
#include snippets/wordpress-w3-total-cache.conf; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _aoFormLoader = (function(w) { | |
var stylesLoaded = false; | |
var captchaLoaded = false; | |
var gfLoaded = false; | |
var htmlId = false; | |
var scheme = document.location.protocol + "//"; | |
var loadForm = function(options) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$values = FieldConfig::loadByName('node', 'BUNDLE', 'FIELD')->getSetting('allowed_values'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE taxonomy_term_data SET vid = 'NEW_TAXONOMY' WHERE vid = 'OLD_TAXONOMY'; | |
UPDATE taxonomy_term_field_data SET vid = 'NEW_TAXONOMY' WHERE vid = 'OLD_TAXONOMY'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
du -hsx * | sort -rh | head -10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip install passlib | |
python -c "from passlib.hash import sha512_crypt; import getpass; print sha512_crypt.encrypt(getpass.getpass())" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE block_content SET uuid = 'uuid from block yml file' WHERE id = 'id of another block to match'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Verbose Beautified Date Range | |
* | |
* @access public | |
* @param mixed $start_date | |
* @param mixed $end_date | |
* @return string $date_range (beautified date range) | |
* @license WTFPL | |
* | |
* @author Jon Brown <[email protected]> |