This document is an attempt to pin down all the things you don't think about when quoting for a project, and hopefully provide a starting point for some kind of framework to make quoting, working and delivering small-medium jobs more predictable and less stressful.
The point to use a slug (semantic URL) besides of improve the SEO of your articles is to prevent that the user, at the creation of for example an article, it uses special characters that aren't allowed in a URL, appropiate the usage etc. What target usage means, is context dependent.
In this article, you'll learn how to slugify a string in PHP properly, including (or not) support (conversion) for cyrilic and special latin characters.
The following function exposes a simple way to convert text into a valid slug:
from __future__ import with_statement | |
from alembic import context | |
from sqlalchemy import engine_from_config, pool | |
from logging.config import fileConfig | |
from models import Base | |
config = context.config | |
fileConfig(config.config_file_name) |
UPDATE wp_posts SET `post_content` = REPLACE (`post_content`, 'src="http://www.your-site.com"', 'src="https://www.your-site.com"'); | |
UPDATE wp_2_posts SET `post_content` = REPLACE (`post_content`, 'src="http://www.your-site.com"', 'src="https://www.your-site.com"'); | |
UPDATE wp_posts SET `guid` = REPLACE (`guid`, 'http://www.your-site.com', 'https://www.your-site.com') WHERE post_type = 'attachment'; | |
UPDATE wp_2_posts SET `guid` = REPLACE (`guid`, 'http://www.your-site.com', 'https://www.your-site.com') WHERE post_type = 'attachment'; |
Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.
You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.
import json | |
import gzip | |
import base64 | |
import StringIO | |
from vcr.serialize import deserialize | |
from vcr.serializers import yamlserializer | |
path = '../cassettes/api-InstagramAPITestCase-test_media.yml' |
<?php | |
// Used in https://github.com/im4aLL/roolith-event | |
class Event { | |
private static $events = []; | |
public static function listen($name, $callback) { | |
self::$events[$name][] = $callback; | |
} |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
#!/bin/bash | |
# copymysql.sh | |
# GENERATED WITH USING ARTUR BODERA'S SCRIPT | |
# Source script at: https://gist.github.com/2215200 | |
MYSQLDUMP="/usr/bin/mysqldump" | |
MYSQL="/usr/bin/mysql" |