(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This method creates quickly new WP Instances and is great for testing, developping, and trying things without messing 'real' installations.
This aproach uses Docker as container system, and we will run 1 container with WP and another for the DB.
<?php | |
/* | |
Plugin Name: Import demo | |
Plugin URI: http://royduineveld.nl | |
Description: A demo import for my blog | |
Version: 1.0 | |
Author: Roy Duineveld | |
Author URI: http://royduineveld.nl | |
*/ |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script> | |
<script src="http://connect.facebook.net/fr_FR/all.js"></script> | |
<script> | |
// Replace the id by any other public page id | |
FB.api('170913076256527/feed', { limit: 3 }, function(result) { | |
$('#fb-feed').empty(); | |
$(result.data).each(function(i, post) { | |
entry = $('<div class="fb-item"></div>'); | |
if (post.icon) { | |
entry.append('<img class="icon" src="' + post.icon + '" />'); |
UPDATE wp_options SET option_value = replace(option_value, 'http://192.168.99.100:32771', 'http://newUrl.com.br/v2/') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://192.168.99.100:32771','http://newUrl.com.br/v2/'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://192.168.99.100:32771', 'http://newUrl.com.br/v2/'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://192.168.99.100:32771','http://newUrl.com.br/v2/'); | |
UPDATE wp_options SET option_value = replace(option_value, 'http://www.192.168.99.100:32771', 'http://newUrl.com.br/v2/') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://www.192.168.99.100:32771','http://newUrl.com.br/v2/'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.192.168.99.100:32771', 'http://newUrl.com.br/v2/'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.192.168.99.100:32771','http://newUrl.com.br/v2/'); |
<?php | |
// É aconselhável criar um backup do banco antes | |
// crie a taxonomia cidade na functions do tema | |
add_action('init', 'register_locations'); | |
function register_locations() { | |
register_taxonomy( 'cidade',array ( | |
0 => 'locais', | |
), | |
array( 'hierarchical' => true, |
// You can only search text if you have text-search indexes. Easy Peasy. | |
// Você só pode buscar por texto se tiver um index (índice) de texto. Fácil pacas. | |
// --- | |
// To create a text index, run: | |
// Para criar um index, rode: | |
// (english example) db.collectionName.createIndex({ fieldName: "text" }); | |
// (portuguese example) db.nomeDaCollection.createIndex({ nomeDoCampo: "text" }); | |
// Ex: Collection "cars", fields "name", "model" | |
db.cars.createIndex({ name: "text", model: "text", brand: "text" }); |
var fs = require('fs'); | |
var path = require('path'); | |
var Canvas = require('canvas'); | |
var Image = Canvas.Image; | |
var img = new Image(); | |
var mask = new Image(); | |
img.onload = function () { | |
var w = img.width; |
Problem:
bin/sh: Magick++-config: command not found
gyp: Call to 'Magick++-config --ldflags --libs' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
Solution: yum install ImageMagick-c++ ImageMagick-c++-devel
http://www.codingsection.com/create-your-own-offline-video-playback-system-like-youtube.html |