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/sh | |
# This script copy fullchain.pem and privkey.pem to concatanate and make the CRT pem | |
# Separate domains by whitespace in DOMAIN_LIST | |
# CRT pem are stored at /usr/local/etc/haproxy/ssl for HAProxy use, change if you want a different dir | |
# ACMEDIR is the location for files produced by acme-client /usr/ports/security/acme-client/ | |
set -e | |
TODAY=`date +"%Y%m%d"` |
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
Check services | |
$ cd ~/Library/LaunchAgents/ | |
Load | |
$ launchctl load $PATH_TO_LIST | |
Unload | |
$ launchctl unload $PATH_TO_LIST | |
https://robots.thoughtbot.com/starting-and-stopping-background-services-with-homebrew |
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
SPAM Wordpress Comments | |
Check spam on approved comments | |
Install Askimet | |
Turn approved to pending | |
update wp_comments set comment_approved='0' WHERE comment_approved='1' | |
Run Askimet |
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
let g:mapleader=' ' | |
syntax on | |
set clipboard=unnamed | |
set cursorline | |
set encoding=utf-8 | |
set guifont= "Menlo:12" | |
set history=1000 "Store :cmdline history | |
set laststatus=2 | |
set mouse=a | |
set number " line numbering |
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
{ | |
"bold_folder_labels": false, | |
// color scheme | |
// "color_scheme": "Treble Light.sublime-color-scheme", | |
"dark_color_scheme": "Bass Green.sublime-color-scheme", | |
"light_color_scheme": "Treble Light.sublime-color-scheme", | |
"enable_tab_scrolling": true, | |
"font_size": 11, | |
"highlight_line": true, | |
"highlight_modified_tabs": true, |
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
Neo4j install OS X | |
$ brew install neo4j | |
To have launchd start neo4j now and restart at login: | |
brew services start neo4j | |
Or, if you don't want/need a background service you can just run: | |
neo4j start | |
DB Folder |
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
Create superuser | |
$ createuser -P -s -e username | |
psswd: | |
$ psql -U username | |
List databases | |
postgres=# \l | |
\q: Quit/Exit |
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
Swap file | |
dd if=/dev/zero of=/usr/swap0 bs=1m count=4096 | |
chmod 0600 /usr/swap0 | |
echo "md99 none swap sw,file=/usr/swap0,late 0 0" >> /etc/fstab | |
swapon -aL |
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
ERROR 1840 (HY000): @@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_EXECUTED is empty. | |
delete command from import dump | |
SET @@GLOBAL.GTID_PURGED='d23dceda-08a4-11e5-85e4-005056a2431f:1-10073'; |
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
top -b | |
ps -aux | |
# partition | |
gpart show | |
# ten largest directories / files | |
du -a /var | sort -n -r | head -n 10 |