$ sudo install -o redis -g redis -d /var/lib/redis2
$ sudo cp -p /etc/redis/redis.conf /etc/redis/redis2.conf
Accessing docker container private network easily from your boot2docker host | |
----- | |
(from http://ispyker.blogspot.com/2014/04/accessing-docker-container-private.html) | |
add a Host-only adapter in VirtualBox | |
OSX: | |
# show route table | |
netstat -nr |
SELECT u.ID, | |
u.display_name as fullname, | |
GROUP_CONCAT(oi.order_item_name SEPARATOR ' | ') as courses, | |
SUM(pm2.meta_value) as order_total | |
FROM wp_users as u | |
INNER JOIN wp_posts as p on p.post_status = 'wc-completed' | |
INNER JOIN wp_postmeta as pm on pm.post_id = p.ID | |
and pm.meta_key = '_customer_user' | |
and u.ID = pm.meta_value | |
INNER JOIN wp_postmeta as pm2 on pm2.post_id = p.ID |
# Optimized my.cnf configuration for MySQL/MariaSQL | |
# | |
# by Fotis Evangelou, developer of Engintron (engintron.com) | |
# | |
# ~ Updated January 2020 ~ | |
# | |
# | |
# The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores. | |
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage. | |
# |
awk -F'"' '/GET/ {print $6}' /var/log/nginx-access.log | cut -d' ' -f1 | sort | uniq -c | sort -rn |
alias ci='composer install' | |
alias c='composer' | |
alias cu='composer update' | |
alias o='open .' | |
alias ..='cd ..' | |
alias ...='cd ../..' | |
alias ....='cd ../../..' | |
alias gs='git status' | |
alias gsh='git push' | |
alias gll='git pull' |
const puppeteer = require('puppeteer'); | |
const request = require('request-promise-native'); | |
const poll = require('promise-poller').default; | |
const siteDetails = { | |
sitekey: '6LeTnxkTAAAAAN9QEuDZRpn90WwKk_R1TRW_g-JC', | |
pageurl: 'https://old.reddit.com/login' | |
} | |
const getUsername = require('./get-username'); |
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |