Skip to content

Instantly share code, notes, and snippets.

View ljanecek's full-sized avatar

Ladislav Janeček ljanecek

View GitHub Profile
ffmpeg -loop 1 -i img.jpg -t 30 output.mp4
.htaccess
-----
RewriteEngine on
RewriteRule ^([a-z]{2}(-[A-Z]{2})?)/(.*) $3?lang=$1 [L,QSA]
index.php
-----
<?php
module.exports = {
http: function(cont, options, next) {
if (cont.$root.$get('nanobar.value') > 1) {
return false;
}
cont.$root.$get('nanobar').go(20)
@ljanecek
ljanecek / gist:eba7c44b6dc518458951
Last active September 9, 2015 13:16 — forked from anonymous/gist:38a56d1749a9982e6b5a
How to find Wordpress featured images together with respective post directly from DB query (for imports, migrations etc.)
SELECT p.*
FROM wp_postmeta AS pm
INNER JOIN wp_posts AS p ON pm.meta_value=p.ID
INNER JOIN wp_posts AS parent ON p.post_parent = parent.`ID`
WHERE pm.meta_key = '_thumbnail_id'
AND parent.post_status = 'publish'
/* You can add more conditions for posts like post type etc. */
ORDER BY p.post_date DESC