Easiest way to install Systemless Root and Xposed on your Nexus 5

The current trend in the Android mod world is to make everything systemless. With the systemless SuperSu and systemless Xposed, you can finally switch back and forth between a stock and a modded system in just one click, allowing you to make OTA updates or just have a clean system without hassle.

After trying a couple of Android ROMs for my Nexus 5, I decided to go back to stock with XPosed (mainly because of the Cataclysm ROM‘s dev stopping working on it).

I was used to do everything manually via adb to have total control, but a couple days ago I let myself be tempted by the powerfull Nexus Root Toolkit. And powerful it really is!

main_window

(suite…)

Paramétrer une adresse email comme username dans Git

Si vous utilisez Git et que votre nom d’utilisateur est une adresse email, vous avez peut-être été confronté à ce problème.

Aucun souci si on tape l’adresse à chaque fois que l’on souhaite clone/push. Mais si on souhaite enregistrer l’email dans le .git/config pour éviter de le retaper à chaque fois, le ‘@’ entre en conflit dans le format attendu « [username[:password]@]domaine » puisqu’il donne

http://mon@email.fr@domaine.net

La solution ? Échapper le caractère en passant par « %40« . Ce qui donne

http://mon%40email@domaine.net

[source]

Connect to PostgreSQL with Slick and Play!2.4

In order to start using PostgreSQL, you will first need to add its JDBC driver dependency in your build.sbt file: (you can find all the available versions here)

"org.postgresql" % "postgresql" % "9.4-1201-jdbc41"

Then you will just need to add access configurations:

slick.dbs.default.driver= "slick.driver.PostgresDriver$"
slick.dbs.default.db.driver="org.postgresql.Driver"
slick.dbs.default.db.url="jdbc:postgresql://localhost:5432/dbname"
slick.dbs.default.db.user="postgres"
slick.dbs.default.db.password=""

Import a CSV with PostgreSQL or H2

If you have a CSV with some rows that you want to directly insert into your PostgreSQL database, you can you the command COPY:

COPY table_name FROM 'path/to/file.csv' DELIMITER ' ' CSV;

Here I used a tab as delimiter but you can of course use any other character, probably ‘;‘ or ‘,‘. This PostgreSQL command can only be executed as SuperUser. A workaround if you are not/don’t want to use root, is to use the psql command ‘\copy’ in your terminal. (more)

With H2 you can also import CSVs but with CSVREAD:

INSERT INTO table_name SELECT * FROM CSVREAD 
  ('path/to/file.csv', null, 'fieldSeparator=' || CHAR(9));

Thi should have the same result. The CHAR(9) is just a tab (9 is its ASCII value)

« Package tikz Error » en utilisant pgfgantt sur LaTeX

Vous aviez une envie soudaine d’insérer des diagrammes de Gantt avec pgfgantt dans vos beaux documents LaTeX.

Mais à peine copié le petit example du guide, vous vous êtes retrouvé avec plusieurs erreurs mettant en cause le « Package tikz » avec des messages comme :

« + or – expected » encore « Giving up on this path. Did you forget a semicolon?« .

La cause semble être une simple incompatibilité avec le paquet babel qui se résout en ajoutant simplement la ligne suivante  à vos dépendances :

\usetikzlibrary{babel}

Keep up with your TV Shows in 3 clicks

What you’ll need:

  • NodeJS (with npm)
  • Peerflix: Open a terminal and enter npm install -g peerflix
  • TV-Show-Manager: Install and add your favorite TV Shows (also take a look at the settings to choose Torrent instead of Direct Download streaming)
  • Replace the default key value of you torrent client in HKEY_CLASSES_ROOT\Magnet\shell\open\command with your peerflix path :
    "C:\Users\{Name}\AppData\Roaming\npm\peerflix" "%1" --vlc -- --fullscreen

Let’s count!

  • Open TV-Show-Manager
  • Right click on the episode in blue (last didn’t see episode)
  • « Quick Download »
  • And… Well, your episode is already streaming 🙂

(suite…)

The best way to Stream your TV Shows with the best quality and speed

TV-Show-Manager preview

Even quicker way, using directly peerflix

tl;dr:

    • Install PopCorn Time and TV-Show-Manager
    • Replace the default key value of you torrent client in HKEY_CLASSES_ROOT\Magnet\shell\open\command by the path to your PopCorn Time Installation

 (eg. "C:\Users\{{UserName}}\AppData\Local\Popcorn Time\nw.exe" "%1")

Motivation

Popcorn Time is wonderful. You have a beautiful UI with an almost endless catalog of Movies and TV Shows.

But I was annoyed by several things: some TV Shows were getting too long to be added to YIFI and the 720p quality, even if really good for its final size, was far from being a real HD. Also, now a big part of YIFY users come from PopCorn Time, so there are lot of leechers that only seed while the show is streaming.

So: coming late episodes, limited choice of quality (sometimes there is only a 480p version, even for popular shows), relatively poor HD quality and finally not the best seed speed.

Also, and this is only because I didn’t took the time to create a Trackt.tv account, I wanted an easy way to see what episodes I haven’t yet seen, possibly just a list with a button that directly starts the stream of the last episode. Again, if you use Trakt.tv or TVshows Manager, PopCorn Time has an inbuilt api calling system.

To do that, I was preparing a Python script with the list of TV shows I am following and that would search, download the torrent (from T411 which has a very high ratio of seeders) and launch it with Popcorn Time.

The Solution

But in the meantime, I’ve found TV-Show-Manager, a tool that does exactly that, except it has a graphical interface, and other little features. Sadly I cannot find it sources anywhere and therefore cannot change use custom trackers it’s written in AutoIT which is far from being my favorite choice for this kind of app.

Another downside was that, by downloading an episode, it automatically opens it with your torrent client, which is not what I wanted: I needed it to start the stream directly (with Popcorn Time, peerflix or whatever).

So I tried to change the default app for .torrent files with Popcorn Time, but it didn’t change anything. So I thought that maybe the TV-Show-Manager was actually opening a magnet:// link

But how am I supposed to change the default app for this kind of link? The first time you open a magnet link with Chrome, it will ask you if you want to open it with the installed torrent client, which for me was µtorrent, without any way to change the app.

Btw, if you want to reset the default behavior, look here.

In order to call whatever app I wanted with the magnet link, I went on the register HKEY_CLASSES_ROOT\Magnet\ (found here) and changed the default key in shell\open\command.

The default key should contain something like

"C:\Users\{{UserName}}\AppData\Roaming\uTorrent\uTorrent.exe" "%1" /SHELLASSOC

Sweet! I tried replacing the uTorrent path to the PopCorn Time one:

"C:\Users\{{UserName}}\AppData\Local\Popcorn Time\PopCorn Time.exe" "%1"

but calling a magnet link would only open PopCorn Time, without doing anything with the given parameter (FYI, %1 is the magnet link). So I tried with

"C:\Users\{{UserName}}\AppData\Local\Popcorn Time\nw.exe" "%1"

and… TADAAAA! It worked perfectly!

So now, whenever I download an episode with TV-Show-Manager (Quick-Download Episode), PopCorn Time opens and I just have to select the file from from the torrent before the stream begins!

Almost every episode is available max 1~2 days after being aired, in 1080p and starts streaming in no more than 5 seconds.

« Permissions denied » dans le dossier /tmp

En voulant installer VMware Player sur ma distribution Linux, j’avais l’erreur suivante au lancement du *.bundle (un installeur sh) :

line 302: /tmp/***/vmware-installer: Permission denied

Le soucis étant que le dossier /tmp était monté sans les droits d’exécution (noexec, configuré dans /etc/fstab). Ceci empêche l’exécution d’un binaire, et ce même si vous lancez la commande en tant que root.

La solution la plus simple est de démonter, puis remonter le dossier /tmp, cette fois-ci en exec via la commande

mount -o remount,exec /tmp

Pour faire les choses proprement, n’oubliez pas de faire la manipulation inverse (en remplaçant « exec » par « noexec » dans la commande) pour plus de sûreté.

Source 1, 2, 3

Les travaux manuels les plus spectaculaires

Calligraphie

Avec l’ère de l’informatique et de la robotisation on a tendance à oublier la beauté du travail manuel. C’est cependant quelque chose inhérent à la nature humaine : créer, modifier et détruire. Preuve en est avec la popularité des Légos, des jeux-vidéos comme Minecraft, de la série « C’est pas Sorcier » qui explique des fonctionnements et, bien entendu, de la cuisine. On aime comprendre d’où viennent les choses et comment les faire de notre propre initiative.

Avec le temps, certains artisans parviennent à atteindre un très haut degré d’excellence dans leur domaine. D’autres créations ont plutôt le mérite d’être originales ou contemplatives. Dans tous les cas, ce sont des activités qui sont étonnantes et belles à voir.

C’est justement le sujet de cet article. J’ai collectionné un bon nombre de vidéos qui m’ont tout particulièrement plu en montrant divers artisans/artistes/experts  au travail.

Cliquez sur le titre pour voir la suite

(suite…)