The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23/12/2008
- Revised date: 15/12/2013
- Original post
public function CompositeUnicodeToUnicode($unicode_str){ | |
$unicode_str = str_replace("\u{0065}\u{0309}", "\u{1EBB}",$unicode_str); # ẻ | |
$unicode_str = str_replace("\u{0065}\u{0301}", "\u{00E9}",$unicode_str); # é | |
$unicode_str = str_replace("\u{0065}\u{0300}", "\u{00E8}",$unicode_str); # è | |
$unicode_str = str_replace("\u{0065}\u{0323}", "\u{1EB9}",$unicode_str); # ẹ | |
$unicode_str = str_replace("\u{0065}\u{0303}", "\u{1EBD}",$unicode_str); # ẽ | |
$unicode_str = str_replace("\u{00EA}\u{0309}", "\u{1EC3}",$unicode_str); # ể | |
$unicode_str = str_replace("\u{00EA}\u{0301}", "\u{1EBF}",$unicode_str); # ế | |
$unicode_str = str_replace("\u{00EA}\u{0300}", "\u{1EC1}",$unicode_str); # ề |
public static String compound2Unicode(String str) { | |
str = str.replaceAll("\u0065\u0309", "\u1EBB"); //ẻ | |
str = str.replaceAll("\u0065\u0301", "\u00E9"); //é | |
str = str.replaceAll("\u0065\u0300", "\u00E8"); //è | |
str = str.replaceAll("\u0065\u0323", "\u1EB9"); //ẹ | |
str = str.replaceAll("\u0065\u0303", "\u1EBD"); //ẽ | |
str = str.replaceAll("\u00EA\u0309", "\u1EC3"); //ể | |
str = str.replaceAll("\u00EA\u0301", "\u1EBF"); //ế | |
str = str.replaceAll("\u00EA\u0300", "\u1EC1"); //ề | |
str = str.replaceAll("\u00EA\u0323", "\u1EC7"); //ệ |
def compound_unicode(unicode_str): | |
""" | |
Chuyển đổi chuỗi Unicode Tổ Hợp sang Unicode Dựng Sẵn | |
Edited from: `https://gist.github.com/redphx/9320735` | |
""" | |
unicode_str = unicode_str.replace("\u0065\u0309", "\u1EBB") # ẻ | |
unicode_str = unicode_str.replace("\u0065\u0301", "\u00E9") # é | |
unicode_str = unicode_str.replace("\u0065\u0300", "\u00E8") # è | |
unicode_str = unicode_str.replace("\u0065\u0323", "\u1EB9") # ẹ | |
unicode_str = unicode_str.replace("\u0065\u0303", "\u1EBD") # ẽ |
<?xml version="1.0"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<!-- /etc/fonts/conf.avail/51-noto-color-emoji.conf --> | |
<fontconfig> | |
<selectfont> | |
<acceptfont> | |
<pattern> | |
<patelt name="family"><string>Noto Color Emoji</string></patelt> | |
</pattern> | |
</acceptfont> |
# Install wordpress | |
wp core download && wp core config --dbname=wordpress_test_db --dbuser=root && wp core install --url=http://localhost/wp-cli/ --title=Wordpress --admin_user=admin --admin_password=admin [email protected] | |
# Install and activate Plugins | |
wp plugin install wordpress-importer --activate && wp plugin install contact-form-7 --activate | |
# Generate Posts | |
curl http://loripsum.wpwolf.com | wp post generate --post_content --count=10 | |
# Activate a theme |
<?php | |
function clear_jetpack_published() { | |
if(empty($_REQUEST['post'])) { | |
wp_die(__('Invalid post ID or action')); | |
} | |
global $wpdb; | |
$id = isset($_REQUEST['post']) ? absint($_REQUEST['post']) : ''; |
# Basically the nginx configuration I use at konklone.com. | |
# I check it using https://www.ssllabs.com/ssltest/analyze.html?d=konklone.com | |
# | |
# To provide feedback, please tweet at @konklone or email [email protected]. | |
# Comments on gists don't notify the author. | |
# | |
# Thanks to WubTheCaptain (https://wubthecaptain.eu) for his help and ciphersuites. | |
# Thanks to Ilya Grigorik (https://www.igvita.com) for constant inspiration. | |
server { |
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php | |
*/ | |
$args = array( |
#!/usr/bin/env bash | |
GIT_DIR_SAVE=$GIT_DIR ; unset GIT_DIR | |
GIT_WORK_TREE_SAVE=$GIT_WORK_TREE ; unset GIT_WORK_TREE | |
if [ ! -f "${OPENSHIFT_DATA_DIR}composer/bin/composer" ]; then | |
export COMPOSER_HOME="${OPENSHIFT_DATA_DIR}.composer" | |
echo $COMPOSER_HOME > ${OPENSHIFT_HOMEDIR}.env/user_vars/COMPOSER_HOME | |
echo "Installing composer" | |
curl -s https://getcomposer.org/installer | env - PATH="/usr/bin:$PATH" php -- --install-dir=$OPENSHIFT_DATA_DIR >/dev/null |