Since MediaWiki 1.16, the software has supported — as an option — RDFa and Microdata HTML semantic attributes. This commit, integrated to the next release on MediaWiki, 1.27, will embrace more the semantic Web making these attributes always available. If you wish to use it today, this is already available in our Git repository. This also simplify […]
Read moreLet’s encrypt lifts quota by domain for renewal
There is currently a limitation of how many certificates you can register per week: a quota of 5 per domain per week. The same limitation applied for renewal, which would have forced to maintain a schedule. This is not the case anymore: if a certificate has already been generated for a specific FQDN, you can renew […]
Read moreDocker: nasqueron/nginx-php-fpm
Tasacora
Follow-up: a BASH script to split a MySQL dump by database
In this post, we’ve seen how to split a large MySQL dump by database. I’ve been asked a script to automate the process. Here you are. Note: On FreeBSD, replace AWK=awk by AWK=gawk and install lang/gawk port, so we can use GNU awk.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
#!/usr/bin/env bash AWK=awk REGEX_NAME="Current Database: `(.*)`" # Checks argument and prints usage if needed if [ "$#" -lt "1" ] then echo "Usage: $0 <dump.sql>" exit 1 fi # Splits dump into temporary files $AWK '/Current Database\: .*/{g++} { print $0 > g".tmpsql" }' $1 # Renames files or appends to existing one (to handle views) for f in *.tmpsql do DATABASE_LINE=`head -n1 $f` [[ $DATABASE_LINE =~ $REGEX_NAME ]] TARGET_FILE="${BASH_REMATCH[1]}.sql" if [ -f $TARGET_FILE ]; then cat $f >> $TARGET_FILE rm $f else mv $f ${BASH_REMATCH[1]}.sql fi done |
Split a large SQL dump by database
You created a MySQL backup of a large server installation with dozens of databases and wish to get the schema and data for one of them. You now have to deal with a file of hundreds of MB in a text editor. How convenient. Split a dump into several files You can quickly split this […]
Read moreChromebook: run a SSH server on Chrome OS
In this post, we’ll cover how to run a SSH server directly on Chrome OS (ie not into a Crouton chroot). One of the first things I do on any machine (FreeBSD, Linux, Mac OS X or Windows) is to install, run and configure the SSH server. It’s always convenient to be able to scp from […]
Read moreBitbucket won’t serve CNAME anymore, how to keep URLs working?
In the past, BitBucket allowed CNAME to use custom subdomains like hg.yourdomain.tld. But recently, Atlassian decided to remove this feature, You can drop the DNS record and update your documentation, but that will be a violation of Cool URIs don’t change and you can’t update paper documentation, bookmark from other users, etc. If you want to keep […]
Read moreDecember 2014 links
Some links of stuff I appreciated this month. Links to French content are in a separate post. You can also take the time machine to November 2014. AI What if instead to understand how the brain works, we copy the neural connections as is? This is what the OpenWorm project tries to do with C. […]
Read moreNovember 2014 links
Some links of stuff I appreciated this month. Links to French content are in a separate post. You can also take the time machine to October 2014. November is the Philae landing on the Comet Churyumov-Gerasimenko month and the ESA photo release under CC-BY-SA (one of them here) month. Mainly DevOps links in this post, a […]
Read more