Archive for the ‘Tips and Tricks’ Category

Battling against the 4.7.0 CrashPlan Synology package update

Saturday, May 21st, 2016

If you’re using CrashPlan to backup data on your Synology NAS in headless mode, you’ve probably already had to go through this update nightmare. This is pretty regular unfortunately; each time an update arrives for CrashPlan, the package gets broken in various ways.

Basically, clicking the “update” button always leads to a couple of hours wasted :(

Here’s how I fixed the issue this time, just in case it could help other people! Before you start, make sure you have a good hour in front of you.. ;-)
The commands are assumed to be executed as root…

  • close your eyes and update the package
  • start the package, it’ll download the update file then will crash and burn
  • copy cpio from the CrashPlan package to /bin/cpio: cp /var/packages/CrashPlan/target/bin/cpio /bin/cpio
  • extract the “upgrade” file: 7z e -o./ /var/packages/CrashPlan/target/upgrade.cpi
  • move the upgrade file outside the Crashplan folder
  • uninstall the CrashPlan package
  • install the CrashPlan package again (don’t let it start)
  • move back the upgrade file and put it in the upgrade folder (/var/packages/CrashPlan/target/upgrade)
  • edit install.vars in the CrashPlan folder to point to the correct location of Java on your NAS. To find it, just use ‘which java’. Then put the correct path for the JAVACOMMON property
  • (optional) rename the upgrade file to upgrade.jar (or whatever you like)
  • extract the upgrade file: 7z e -o/var/packages/CrashPlan/target/lib /var/packages/CrashPlan/target/upgrade/upgrade.jar
  • remove the upgrade file (not needed anymore)
  • remove the upgrade.cpi file
  • IF you have enough memory, then add the USR_MAX_HEAP property to /var/packages/CrashPlan/target/syno_package.vars
  • start the CrashPlan package; it should now stay up and running
  • install the latest CrashPlan client version on your machine
  • disable the Crashplan service on your machine
  • get the new Crashplan GUID on your NAS: cat /var/lib/crashplan/.ui_info; echo
  • copy the guid (everything before “,0.0.0.0”) in the ‘.ui_info’ file under C:\ProgramData\CrashPlan (assuming you’re on Windows). You must edit the file from a notepad executed as admin. Make sure to replace the IP (127.0.0.1) by the one of your NAS
  • Start the CrashPlan client, enter your CrashPlan credentials and passphrase (you do have one, right? :p)
  • Now let CrashPlan sync all your files for a few days :o)

Hope this helps!

Enjoy :)


Chrome Extensions that rock

Friday, August 14th, 2015

TL;DR: I can’t live without browser extensions, here are my favourite ones

Most if not all power users rely on the presence of a number of browser extensions to satisfy their specific needs/lunacies. The fact that Internet Explorer never provided an easy/accessible way to develop & deploy extensions is one of the many reasons why it was never my default Web browser (apart from when Microsoft forced my hand with OS upgrades…).

Fortunately for us, modern Web browsers (apart from MS Edge) are very customizable and major ones such as Google Chrome & Firefox have huge catalogs of extensions. The difficulty that remains for us is to find the truly great extensions among the huge number of crappy and plain evil ones ;-)

I’ve switched from Firefox to Chrome at the time Chrome came out and was blazingly fast and I haven’t taken a look back ever since (even if I know I probably should), hence I’ll only list the Google Chrome extensions that I use, although there are counterparts for most of the ones I’m about to mention.

So here’s my current list, in no particular order:

  • uBlock Origin: efficient AD blocker. If you need but one extension then it must be this one (light CPU/memory usage)
  • Personal Blocklist (by Google): if you want to block domains/hosts from appearing in your Google search results (e.g., shopping/comparison crap sites when you search for information about products)
  • Clickable Links: doesn’t it make you mad when websites display URLs without links? This extension fixes that automatically
  • ScriptSafe: if you want to stay in charge of what Web browser does
  • View Thru: if you’re concerned about what stands behind shortened URLs (e.g., bit.ly & the like)
  • Ghostery: if you care even a little about your privacy then this one should get your attention
  • Shoptimate: automatic price comparison: awesome extension to help you know if you’re getting the best price you can
  • The Camelizer: see historical pricing data and even get mails when prices drop
  • Page Eraser: sometimes there are things on Web pages that aren’t necessarily ads but that we just don’t care about/don’t wanna see. This extension will help you make them disappear.. for good :). I’ve developed a similar extension a while ago but I don’t maintain it anymore :p
  • Link2Clip: Copy all links in the copied text to your clipboard. Very useful when you don’t want to manually extract links from web pages
  • LinkClump: alternative that supports fast bookmarking
  • Docomplete: this extension enables autocomplete for password fields on websites that intentionally disable it (use this only if you know what that means.. ^^)
  • Lazarus: Form Recovery: automatically save everything you type in forms so that you can easily recover from timeouts, crashes & network errors
  • BehindTheOverlay: easily close overlays on any websites
  • iMacros for Chrome: automate tasks by recording/replaying macros
  • Gestures for Google Chrome: mouse gestures rock, just try it out
  • Desprotetor de Links: sometimes websites send you through link protectors & whatnot with tons of boring ads. If you’re like me then you’ll like this extension because it’ll help you go right through to the content you’re after
  • Fast Bookmark Scanner: scan your bookmarks & identify duplicate links, folders & empty ones
  • SuperSorter: alternative extension to fix your bookmarks
  • SmoothScroll: smooooooooooth scrolling is something you need even if you don’t know it yet
  • I’m a Gentleman: one click to save images
  • Neater Bookmarks: neat bookmarks tree popup with easy filtering
  • Session Buddy: save/load entire browsing sessions; useful for context switches
  • Session Manager: alternative for session management
  • Turn Off the Lights: fade the entire web page to dark in order to better appreciate videos
  • Capture Webpage Screenshot – FireShot: quickly capture a screenshot of an entire web page
  • Random Bookmark: this may sound dumb but if you have a huge backlog of bookmarks to check then this one can help :)
  • Scroll To Top: does what it says
  • Shut Up: lets you choose if comment sections should be visible or not
  • Live HTTP Headers: because it’s always useful to know what your browser is up to
  • Page Monitor: for times when you need to know as soon as a page has changed without killing your F5 key (e.g., that concert reservation page that’s about to go live)
  • Pastebin.com: put stuff on Pastebin.com easily
  • Enhanced Steam: dramatically improve the Steam website (highlight games you own, games on your wishlist, calculate bundle discounts based on the games you own, etc)
  • Play to Kodi: if you’re using XBMC errr Kodi then you need this extension to easily send content to your server
  • Google Cast: if you have a Google Chromecast, then you just need this
  • Language Immersion for Chrome: cool extension to immerse yourself in a new language. This extension switches certain words/phrases from English into a language of your choice and you can switch back and forth between the original & translated versions
  • Reddit Enhancement Suite: nice improvements for browsing Reddit
  • .torrent to Transmission: easily add torrents to Transmission (works with distant hosts as well; useful since Transmission runs on my NAS)
  • Better Usenet: if you’re a Usenet user then you’ll love this one; it adds a ton of improvements to Usenet related websites (e.g., Binnewz, Binsearch, NZBIndex, …)
  • Binnews Enhancer: another Usenet-specific extension that improves the Binnewz website
  • CouchPotato: if you use CouchPotato then you’ll like this one

Bonus: DO IT! (just in case you need some motivation

Voilà! Apart from a bunch of software development related ones, the extensions above are the ones I can’t live without!

Which ones do YOU rely on and why?


Extracting audio from a video using ffmpeg.. and cutting a part of a video

Friday, January 2nd, 2015

This post will mainly serve as a reminder for the next time I ever need this. The goal is absolutely NOT to create a detailed guide.. ;-)

To extract the audio track out of a video:

ffmpeg -i input.mp4 -c:a copy -vn -sn output.m4a

 

To cut a part of a video (no re-encoding):

ffmpeg -i VID_20140214_171208.mp4 -vcodec copy -ss 00:10:00 -t 00:00:08 result.mp4

The command above cuts from 10:00 and takes 8 seconds of video.