-
Open the Terminal
-
Use
mysqldump
to backup your databases -
Check for MySQL processes with:
ps -ax | grep mysql
-
Stop and kill any MySQL processes
-
Analyze MySQL on HomeBrew:
brew remove mysql
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
<?php | |
/** | |
* Rename "Posts" to "News" | |
* | |
* @link http://new2wp.com/snippet/change-wordpress-posts-post-type-news/ | |
*/ | |
add_action( 'admin_menu', 'pilau_change_post_menu_label' ); | |
add_action( 'init', 'pilau_change_post_object_label' ); | |
function pilau_change_post_menu_label() { |
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
# applescript | |
# add login item | |
osascript -e 'tell application "System Events" to make login item at end with properties {name: "Notes",path:"/Applications/Notes.app", hidden:false}' | |
# delete login item | |
osascript -e 'tell application "System Events" to delete login item "itemname"' | |
# list loginitems | |
osascript -e 'tell application "System Events" to get the name of every login item' |
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
#!/bin/bash | |
# generate new personal ed25519 ssh key | |
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>" | |
# generate new host cert authority (host_ca) ed25519 ssh key | |
# used for signing host keys and creating host certs | |
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network | |
eval "$(ssh-agent -s)" |
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
<?php | |
/* | |
The MIT License (MIT) | |
Copyright © 2014 Ian Lai | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the “Software”), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
<title>Site Title</title> | |
<link rel="stylesheet" href="/assets/css/style.min.css"> |
This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.
This documentation has moved here: https://github.com/johnbillion/wp_mail
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
1. DO NOT use 'admin/administrator/website-name/company-name' as your WordPress username | |
2. DO generate a secure password | |
3. DO create your own themes so you can ensure they are clean | |
4. DO check plugin reviews and check they are actively maintained | |
5. DO Keep regular backups | |
6. DO NOT push `wp-config.php` to a public Git Repository | |
7. DO use a custom database prefix instead of the default `wp_` | |
8. DO use a custom Directory structure | |
9. |
Options included below:
- Using Docker
docker-compose
- Using Homebrew
brew
This gist was originally created for Homebrew before the rise of Docker, yet it may be best to avoid installing mysql via brew
any longer. Instead consider adding a barebones docker-compose.yml
for each project and run docker-compose up
to start each project's mysql service.
A simple script that resets latest MAMP PRO 4 trial validity, and keeps your data safe.
- Copy the code into a file OR download the script and save it as reset_mamp4.sh
- Open the Terminal app and write
chmod +x
then drag and drop the file on the Terminal. You should have something likechmod +x reset_mamp4.sh
. Press Enter to run it. - Now, run the file itself by dragging and dropping it on the Terminal (something like
reset_mamp4.sh
) then pressing Enter. - Open MAMP PRO and check if you have 14 days left now.
OlderNewer