Pattern below allows for a bash script to be called via, say, cron and check to see if it is already running.
Useful for things like rsync
tasks.
PIDFILE=/var/run/myscriptname.pid
if [ -f $PIDFILE ]
then
PID=$(cat $PIDFILE)
<!doctype html> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |
<?php | |
/** | |
* Retrieves a template part and caches the output to speed up site | |
* NOTE: Because we are caching display of posts, we need to make sure to delete the transients when posts are updated or published that might affect these template parts. | |
* | |
* Uses this function in conjunction with the WP cache: http://codex.wordpress.org/Function_Reference/get_template_part | |
* | |
* @param $slug (string) (required) The slug name for the generic template. | |
* @param $name (string) (optional) The name of the specialized template. | |
* @return (string) HTML output of the template part. |
ab -c 10 -n 1000 -H "Accept-Encoding: gzip,deflate" http://www.example.com/ |
$ wp post list --format=ids | xargs wp post update --comment_status=closed | |
# Output: | |
# Success: Updated post 2514. | |
# Success: Updated post 2511. | |
# Success: Updated post 2504. | |
# Success: Updated post 2499. | |
# Success: Updated post 2441. | |
# etc... |
# UPDATED 17 February 2019 | |
# Redirect all HTTP traffic to HTTPS | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name www.domain.com domain.com; | |
return 301 https://$host$request_uri; | |
} | |
# SSL configuration |
Pattern below allows for a bash script to be called via, say, cron and check to see if it is already running.
Useful for things like rsync
tasks.
PIDFILE=/var/run/myscriptname.pid
if [ -f $PIDFILE ]
then
PID=$(cat $PIDFILE)
#EXTM3U | |
#EXTINF:0,France Culture - direct | |
http://direct.franceculture.fr/live/franceculture-midfi.mp3 | |
#EXTINF:0,France Inter | |
http://icecast.radiofrance.fr/franceinter-hifi.aac?id=radiofrance | |
#EXTINF:0,France Musique | |
http://direct.francemusique.fr/live/francemusique-midfi.mp3 | |
#EXTINF:0,France Info | |
https://stream.radiofrance.fr/franceinfo/franceinfo_hifi.m3u8 | |
#EXTINF:0,France Culture - alternative link |
Reference: Sequelize docs on association
Let’s say we have two models: Films
and Festivals
We know that a film can be shown at many film festivals and that, conversely, a festival can show many films. This is what is known as a many-to-many relationship.
Knowing this, we can set up our associations:
0815.ru | |
0815.ru0clickemail.com | |
0815.ry | |
0815.su | |
0845.ru | |
0clickemail.com | |
0-mail.com | |
0wnd.net | |
0wnd.org | |
10mail.com |
function pjl_skh_feed($qv) { | |
if (isset($qv['feed']) && !isset($qv['post_type'])) | |
$qv['post_type'] = array('post', 'cpt_nr1', 'cpt_nr2'); | |
return $qv; | |
} | |
add_filter('request', 'pjl_skh_feed'); |