true phone: the best android phone app

True Phone in my opinion is the best phone app: indeed without unnecessary special effects, it offers a remarkable range of features, including choosing the address books.

As an example, you can set davx (/nextcloud) as the main address book, instead of the google one.
Or you can view groups of contacts – which almost no other app does.

Obviously, you can set customized ringtone and sounds. Or easily modify contacts.

But there a lots of interesting features. It is undoubtedly worth trying.

how split a mkv with subtitles

You can use mkvtoolnix, then go to -> output, and -> splitting -> by parts based on timestamps -> and there you can write the beginning and the end of the poart you want extract (without spaces: like 1:02:07-1:04:40, for example).

show “alt” attribute after an image

You can use a javascript, like this

<script type="text/javascript">
// img[style]').each(function(){
       $el = $(this);
       var style = $el.attr('style');
       $el.attr('style','');
       $el.parent().attr('style',style);
    }); //Moves the inline styles

      $("img").each(function(){
          var title = this.alt;
          $(this).after(''+ title +'');
      }); //Adds the dynamic captions.
 });
 //]]>
</script>

adb-sync

To sync a PC with a smartphone (or any other android device, like an android e-reader or tablet) you can use abd, and abd-sync. This latter has the advantage that it can, unlike adb push --sync, delete files no more existing in source or create new folders.

Indeed adb push –sync can only update files and folder already existing.

a problem: the external card

You can sync not only the internal memory of your android device, but an external card as well. The problem might be find the extact name and path of your external card: so you can use adb shell, and then df and ls to see the folders our the whole device (including the external card) with its exact name, that you will be able to use afterward in adb / adb-sync.

But if you adb-sync keeping the external card into your device, because it is more convenient, you will find some problems, such as the symlinks (not considered).

So, you might try with krusader and a sync via mtp, but this is very slow.

include wordpress category (or tag) posts in a website

  • You can install wordpress in a subdirectory of your website, in localhost as well.
  • Afterward you can embed the content (or the link) of your wordpress posts in your php pages using a code like the following:
<?php 
/* the path of your wordpress subfolder with the file, required, "wp-blog-header.php" */
require("$root/wordpress/wp-blog-header.php");
//get_header(); [you can omit this row, if you want embed the wp posts in your page having already header and styles]
?>


<?php
// Get the last 200 posts of a given category: 
//in this case the 565 one (=office).
global $post;
$args = array('posts_per_page' => 200,  'category' => 565 );
$myposts = get_posts( $args );

foreach( $myposts as $post ) :	setup_postdata($post); ?>
<h2><?php the_title(); ?></h2>
<p><?php the_content(); ?></p>
// the following code is to put a link: you could choose to don't add it, or, on the contrary, to put only it
<a href="<?php the_permalink() ?>" rel="bookmark" 
title="Permanent Link to <?php the_title_attribute(); ?>">
<?php the_title(); ?></a><br />
<?php endforeach; ?>
  • if you want embed in your pages tag posts instead of category posts you can use this code

$args = array('posts_per_page' => 100, 'tag' => 'css' );

Further info here.