Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors
docker cp <dbfile.sql> <container>:/tmp/import.sql | |
docker exec -it <container> /bin/bash | |
mysql -u <user> -p <database name> < import.sql |
#!/bin/sh | |
UNAME=$(uname) | |
if [ "$UNAME" == "Linux" ] ; then | |
echo "Linux" | |
elif [ "$UNAME" == "Darwin" ] ; then | |
echo "Darwin" | |
elif [[ "$UNAME" == CYGWIN* || "$UNAME" == MINGW* ]] ; then |
#!/bin/sh | |
# PATH TO YOUR HOSTS FILE | |
ETC_HOSTS=/etc/hosts | |
# DEFAULT IP FOR HOSTNAME | |
IP="127.0.0.1" | |
# Hostname to add/remove. | |
HOSTNAME=$1 |
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors
#!/usr/bin/env bash | |
# Exit if any command fails | |
set -o errexit | |
# Exit if trying to use undeclared var | |
set -o nounset | |
# On piped commands, use the exit status of the last command throwing a non-zero exit code |
<!DOCTYPE html> <script src="https://banners.adfox.ru/171128/adfox/526462/2306392_1.js"></script> <script> | |
(function (lib, img, cjs, ss, an) { | |
var p; // shortcut to reference prototypes | |
lib.ssMetadata = [ | |
{name:"2_atlas_", frames: [[0,280,990,90],[0,372,990,90],[0,0,990,186],[0,464,990,90],[0,1108,100,100],[0,556,990,90],[0,648,990,90],[0,740,990,90],[0,832,990,90],[0,924,990,90],[0,1016,990,90],[0,188,990,90]]} | |
]; | |
// symbols: |
<?php | |
/* | |
Plugin Name: Post_Widget | |
Plugin URI: http://# | |
Description: Плагин создает виджет позволяющий вывести 10 последних записей и отсортировать их | |
Version: 1.0 | |
Author: Капанов Е.А. | |
Author URI: http://# | |
*/ |
<?php | |
$args = array( | |
'posts_per_page' => 5, | |
'post_type' => 'room', | |
'order' => 'ASC', | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'post_tag', | |
'field' => 'slug', |
<?php | |
/** | |
* 1. В таблице wp_options находим ключ yoast-seo-premium_license или wordpress-seo-premium_license | |
* и меняем его значение на `a:3:{s:3:"key";s:6:"zalupa";s:6:"status";s:5:"valid";s:11:"expiry_date";s:19:"2970-01-01 00:00:00";}` | |
* | |
* 2. Чтобы не слетали все ваши махинации после захода на страницу обновления или проверки лицензии, | |
* достаточно запретить плагину ломиться по своему АПИ на свой сайт. | |
* Я это сделал просто: в файле \wordpress-seo-premium\vendor\yoast\license-manager\class-update-manager.php | |
*/ |
function yoast_clear_sitemap( $output, $url ) { | |
$timezone = new WPSEO_Sitemap_Timezone(); | |
$date = null; | |
if ( ! empty( $url['mod'] ) ) { | |
$date = $timezone->format_date( $url['mod'] ); | |
} |