Daily Weekly Monthly

Monthly Shaarli

All links of one month in a single page.

May, 2018

GitHub - gtalusan/kobo-nightmode: white-on-black mode for Kobo ebook readers

A tiny hack to read white-on-black on Kobo ebook readers.

Usage

There are three ways to contol nightmode:

  • Long-press the LIGHT / HOME button on your device to toggle
  • Write into the /tmp/invertScreen fifo-interface
    • Send y to set nightmode to ON
    • Send n to set nightmode to OFF
    • Send t to toggle
  • define action 'toggleNightMode' on a (configurable) level of brightness and set and maintain that brightness level through Kobo UI for a (configurable) number of seconds
Kobo Development Tutorial: 0 to Hero - MobileRead Forums

Comment mettre en place un environnement de développement pour Kobo ?

firmware docooler m9s pro - FreakTab.com

Hey everyone can some one help me locate the right firmware for this box please.. some one told me its a generic box but i dont have a single clue locating the

Can't force git to use https:// instead of git:// · Issue #5257 · npm/npm · GitHub

I fixed this issue for several of my colleagues by running the following two commands:

git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf git://

One thing we noticed is that the .gitconfig used is not always the one expected so if you are on a machine that modified the home path to a shared drive, you need to ensure that your .gitconfig is the same on both your shared drive and in c:\users[your user]\

La société de distraction ou comment s’éteindre sans s’en rendre compte ~ Adrastia

Tu te demandes sans doute ce qui est arrivé avant que tu débarques ici. Eh bien des tas de trucs, à dire vrai. On a évolué, on est devenu des êtres humains, et c’est là que les choses se sont gâtées...

Via Shaarli

[Win 7] Déplacer le répertoire "utilisateurs" ? - Windows et les logiciels sous Windows - Forums BHmag.fr

You can move the entire C:\Users folder to a different drive pretty easily after windows is installed:

  1. Boot to the installation media, and get to the command prompt (I believe you need to click repair first)

  2. Use Robocopy to copy C:\Users to D:\Users: robocopy c:\Users d:\Users /mir /xj /copyall

...:. a. /mir tells robocopy to mirror the directories, this will copy all files and permissions

...:. b. /xj is very important, this tells robocopy not to follow junction points. If you forget this, you will have a lot of trouble.

...:. c. /copyall will copy all the attributes includings ACL and Owner info

  1. Verify that the files successfully copied

  2. Delete c:\Users

  3. Create junction that points to d:\Users: mklink c:\Users d:\Users /j

That's it. I've been using this process since Vista went RTM with no problems.

fusée (à la) framboise - A portable RPi Fusée Gelée rig | GBAtemp.net - The Independent Video Game Community

About
fusée framboise is a custom bare-bones Raspbian image that has a systemd Unit that loops modshipd.sh of fusee-launcher.

How-to

Ingredients

A Raspberry Pi Zero (any RPi works, but the Zero tends to run off of any power bank)
A power bank (for powering the RPi)
A non-powered USB hub (why?)
A USB-A to C cable (don't get a no-brand one: it may not have a needed resistor, and it may wreck your Switch or your USB source)
A USB-A to Micro cable (for RPi power)
A USB Micro to USB-A Female cable (only for the RPi Zero: for plugging in the USB hub)

SD Setup

Download a fusee-framboise image.
Flash it to your RPi's SD card. (If you don't have a flasher software installed, I recommend Etcher.)

Cables!

Plug the USB Micro to USB-A Female cable into the RPi. (only for RPi Zero)
Plug in the USB hub into the USB-A Female cable.
Plug in the USB-A to C cable into the USB hub.
Plug in the USB-A to Micro cable into the USB hub, and into the RPi.

Usage
You should just be able to plug in your Switch, put it into RCM, and the payload should automatically launch.

Replacing the payload
To replace the payload, you have two methods: (both need sudo)

Replace fusee.bin in /etc/fusee-launcher/ with another payload. (recommended)
Copy another payload into /etc/fusee-launcher/, change modchipd.sh to point to it, and restart the fusee-launcher service, or reboot.

Networking
You can change the payload over the air. Here's how to do it: (your RPi needs wireless, and you'll need a mobile/normal hotspot to do this)

Set a root password with "sudo passwd", and take note of it.
Change your default pi user's password from "raspberry". (optional, recommended)
Turn on SSH: it's in Interfacing Options of raspi-confiig.
Configure your Pi to connect to your phone's network.
Reboot to connect to it, run ifconfig, and take note of the settings.
Set a static IP based on your ifconfig data.
Take note of your static IP. (you should probably take note of it on your phone)
Use an app that supports SFTP to connect to your RPi with the new root password. (iOS)
Does anyone understand AML-AUTOSCRIPT? - FreakTab.com

if mmcinfo
then
if fatexist mmc 0:1 u-boot.bin
then fatload mmc 0:1 82000000 u-boot.bin
echo @@@@@@@@@@@@@@@@@@@@@@@@ erase spiflash : need about one minute @@@@@@@@@@@@@@@@@@@@@@
sf probe 2
sf erase 0 600000
sf write 82000000 0 60000
echo @@@@@@@@@@@@@@@@@@@@@@@@ erase nandflash @@@@@@@@@@@@@@@@@@@@@@
nand erase 0
reset
fi
fi

[HOWTO] Unbrick WeTek Play - WeTek Community Forum

It might be very rare (actually it happened to me only once, few months ago, while doing "dev work" and I had no RS232 cable, I locked myself out because of a bad rom flashing) but if your device seems dead and refuses to boot to recovery using the bottom located pinhole as trigger to enter recovery (see CWM or TWRP threads for more infos about entering recovery) don't be afraid because, unless you suffer of an hardware failure, you will be able to unbrick it using this MicroSD rescue method.

wetek ne demare plus - WeTek Community Forum

mmcinfo
fatload mmc 0 0x82000000 u-boot.bin
sf probe 2
sf erase 0 60000
sf write 0x82000000 0 60000
sf erase 0x100000 0x8000
reset

[ROM] Mecool M8S PRO W TVStock Nexus ROM (Android TV 7.1) - FreakTab.com

In the spirit of the Pure Nexus Project, these TVStock Nexus ROMs deliver the pure Android TV experience using the Open GApps TVStock Package (https://github.com/ope

[ROM] Mecool M8S PRO W TVStock Nexus ROM (Android TV 7.1) - FreakTab.com

In the spirit of the Pure Nexus Project, these TVStock Nexus ROMs deliver the pure Android TV experience using the Open GApps TVStock Package (https://github.com/ope

Attention PGP Users: New Vulnerabilities Require You To Take Action Now | Electronic Frontier Foundation

Our advice, which mirrors that of the researchers, is to immediately disable and/or uninstall tools that automatically decrypt PGP-encrypted email. Until the flaws described in the paper are more widely understood and fixed, users should arrange for the use of alternative end-to-end secure channels, such as Signal, and temporarily stop sending and especially reading PGP-encrypted email.

Mobile · golang/go Wiki · GitHub

go - The Go programming language

Add support for VSS (windows) · Issue #340 · restic/restic · GitHub

To more easily integrate restic with automatic VSS creation I wrote a Windows PowerShell script that can be run to automate this without the complications mentioned above. It is available in the attached zip:
restic-backup-windows-vss.zip

If restic has a repository for external scripts but perhaps it could be included there.

The meat of the script is in these lines excerpted from the script (omitting the config part):

$ShadowPath = $rootVolume + 'shadowcopy\'

Create a volume shadow copy and make it accessible

$s1 = (Get-WmiObject -List Win32_ShadowCopy).Create($rootVolume, "ClientAccessible")
$s2 = Get-WmiObject Win32ShadowCopy | Where-Object { $.ID -eq $s1.ShadowID }
$device = $s2.DeviceObject + "\"

Create a symbolic link to the shadow copy

cmd /c mklink /d $ShadowPath "$device"

Run Restic on the data files in the shadowcopy

ForEach ($folderToBackup in $foldersToBackup) {
cmd /c $resticExe backup -r $resticRepository ($ShadowPath + $folderToBackup)
}

Delete the shadow copy and remove the symbolic link

$s2.Delete()
cmd /c rmdir $ShadowPath

Modèle de lettre : Saisine du procureur de la République suite à un commandement de payer une amende de stationnement

[Nom & prénom]

[Adresse]

Numéro du procès-verbal initial : [numéro]

Numéro de l'avis d'injonction de payer : [numéro]

Monsieur l'Officier du Ministère public

[Adresse figurant sur le procès-verbal initial]

[Ville], le [date]

Objet : Saisine du Procureur de la République suite à un commandement de payer une amende de stationnement

Lettre recommandée AR

Monsieur l'Officier du Ministère public,

Je me permets de solliciter votre bienveillance afin de vous faire part de ma situation relative à un commandement de payer une amende de stationnement.

En effet, j'ai été sanctionné pour une infraction aux règles du stationnement par le biais d'un procès-verbal numéroté [numéro] qui me fut notifié le [date de notification du PV] (cf copie du PV).

Estimant ce procès-verbal infondé, j'avais émis une réclamation auprès de vos services via un courrier en date du [date de rédaction/d’expédition du courrier] (cf copie du courrier allégué).

De fait, une telle réclamation aurait dû suspendre le recouvrement par le Trésor public de l'amende infligée au sens de l'article R49-8 du Code de procédure pénale. Or, il s'avère que j'ai reçu une injonction de payer ladite amende alors que vos services [ne m'ont communiqué aucune suite concernant ma demande de contestation/m'ont fait part d'une décision favorable à ma demande de contestation (cf copie de ladite décision].

Ainsi, je me permets de procéder à une saisine de votre autorité, et ce afin que le Trésor public cesse et annule toutes procédures de recouvrement à mon encontre.

En vous remerciant pour l’attention que vous porterez à ma demande, je vous prie d’agréer, Monsieur l'Officier du Ministère public, l’expression des mes salutations distinguées.

[Signature]

How to get into a docker container? - Stack Overflow

Et pour être root :

docker exec -it --user root bash

[Release] Python script to generate the rsa_kek! | GBAtemp.net - The Independent Video Game Community

You want your tickets decrypted with SciresM's script?
You want to datamine all the latest games?
You want to legally get the title keys for games you...

Nintendo switch cfw state? | Page 4 | GBAtemp.net - The Independent Video Game Community

No, seriously, you're not going to download anything from their servers you don't own. Only thing you have access to is sysupdates. If you try, you'll...

[Tutorial] How to dump Switch NAND using Linux | GBAtemp.net - The Independent Video Game Community

Intro

Until no one published working NAND Dumper payload I wanted to share this quick tutorial how to dump encrypted NAND content to the SD card...

S905X Android 8.0 Oreo (Tested on Mini M8S II. Possibile to work on other GXL/S905X boxes. Testing needed! "WIP") - FreakTab.com

Android Oreo
Tested with Mini M8S II
(Possible to work on other GXL/S905X boxes. Testing needed)

Screenshot_20180310-115228.png

Screenshot_20180314-142852.png

untitled

Hi,

I'm evaluating the right backup service for my needs. This boils down to
comparing Restic and Borg as they represent the "top of the shelf"
solutions currently available on Linux.

Borg : 1.1.0rc3 (from the borg-linux64 binary)
Restic : 0.7.1 (from the restic linux_amd64 binary)

The backup data consists of a live mail repository using the maildir format
and holding 139 GB (2327 dirs, 665456 files).

Keep in mind that this is the result of my own experience, for my own needs
and this is in no way thorough nor exhaustive.

BORG :

Note: Encryption is "repokey-blake2"

  • First pass

Shell# time ./borg-linux64 create --info --stats --progress
/path/to/BackupTests/Borg::{now:%Y%m%d-%H%M%S} /path/to/Mail/
Enter passphrase for key /path/to/BackupTests/Borg:

Archive name: 20170911-164308
Archive fingerprint:
ea043fb5154c60ecdcb42e3be238cfa2ad040e03349f5ae5cab6a9f9f8fd48fe
Time (start): Mon, 2017-09-11 16:43:11
Time (end): Mon, 2017-09-11 17:58:32
Duration: 1 hours 15 minutes 20.67 seconds
Number of files: 646835
Utilization of max. archive size: 0%

                   Original size      Compressed size    Deduplicated

size
This archive: 137.47 GB 112.55 GB 102.30
GB
All archives: 137.47 GB 112.55 GB 102.30
GB

                   Unique chunks         Total chunks

Chunk index: 639574 680719

real 75m33.037s
user 23m22.756s
sys 3m51.228s

  • Second pass

Shell# time ./borg-linux64 create --info --stats --progress
/path/to/BackupTests/Borg::{now:%Y%m%d-%H%M%S} /path/to/Mail/
Enter passphrase for key /path/to/BackupTests/Borg:

Archive name: 20170911-181622
Archive fingerprint:
67e9f0e14fa092d274e99833806ca789eb88df890190ec37cedb5e4af20107a0
Time (start): Mon, 2017-09-11 18:16:25
Time (end): Mon, 2017-09-11 18:18:27
Duration: 2 minutes 1.73 seconds
Number of files: 646861
Utilization of max. archive size: 0%

                   Original size      Compressed size    Deduplicated

size
This archive: 137.47 GB 112.55 GB 14.57
MB
All archives: 274.94 GB 225.10 GB 102.32
GB

                   Unique chunks         Total chunks

Chunk index: 639728 1361461

real 2m13.070s
user 1m55.448s
sys 0m12.652s

RESTIC :

  • Fist pass

Shell# time ./restic_0.7.1_linux_amd64 backup -r
/path/to/BackupTests/Restic/ /path/to/Mail/
enter password for repository:
scan [/path/to/Mail]
scanned 2327 directories, 665464 files in 0:02
[1:48:16] 100.00% 21.440 MiB/s 136.009 GiB / 136.001 GiB 667813 / 667791
items 0 errors ETA 0:00
duration: 1:48:16, 21.44MiB/s
snapshot 9abedefd saved

real 108m23.314s
user 48m2.328s
sys 6m12.984s

  • Second pass

Shell# time ./restic_0.7.1_linux_amd64 -r /path/to/BackupTests/Restic/
backup /path/to/Mail/
enter password for repository:
using parent snapshot 9abedefd
scan [/path/to/Mail]
scanned 2327 directories, 665575 files in 0:04
[0:47] 100.00% 2.855 GiB/s 136.010 GiB / 136.010 GiB 667902 / 667902
items 0 errors ETA 0:00
duration: 0:47, 2920.94MiB/s
snapshot 6c90edf6 saved

real 0m55.859s
user 2m10.312s
sys 0m9.364s

BORG vs RESTIC on Backup :

  • Borg is way faster on first pass (1h15m vs 1h48m) but significantly
    slower on second pass (2m1s vs 47s)

  • Borg repo size (103 GB) is smaller than Restic repo size (121 GB)

BORG vs RESTIC on mounted archives :

  • Simple access to the mounted repositories :

Shell# time ls -l BorgMount/20170911-181622/
total 0
drwxr-xr-x 1 root root 0 sept. 11 19:48 path

real 0m22.383s
user 0m0.000s
sys 0m0.000s

Shell# time ls -l ResticMount/snapshots/2017-09-11T18\:15\:18+02\:00/
total 0
drwx------ 3 mail mail 0 déc. 7 2014 Mail

real 0m0.003s
user 0m0.000s
sys 0m0.000s

  • Borg needs 22 seconds to internally build the directory tree, Restic is
    instant.

  • Interesting note : The first visible directory is exactly the specified
    backup path "path" (/path/to/Mail) for Borg whereas Restic only keeps the
    last path component "Mail" (/path/to/Mail).

  • Extract some path from the mounted repositories :

  • Shell# time cp -a BorgMount/20170911-181622/path/to/[...]/Trash
    BorgRestore/

real 3m36.534s
user 0m0.396s
sys 0m7.944s

NOTE: CPU usage was spiking at 100% when no disk activity (building
internal listings is my guess) and jumping between 31~67% for disk activity
(actual copy process)

  • Shell# time cp -a
    ResticMount/snapshots/2017-09-11T18\:15\:18+02\:00/[...]/Trash
    ResticRestore/

real 6m23.970s
user 0m0.496s
sys 0m13.708s

NOTE: CPU usage never spikes and constantly jumps between 21~53% for the
whole process

  • The "Trash" directory is 6.3 GB big with 47945 files in it.

  • Borg is faster by a factor of 2 to restore the exact same data using
    about 2x more CPU.

  • Fetch deep info on mounted repositories :

Shell# time du -s --si ResticMount/snapshots/2017-09-11T18\:15\:18+02\:00/
147G ResticMount/snapshots/2017-09-11T18:15:18+02:00/

real 1m18.590s
user 0m0.800s
sys 0m4.036s

NOTE: CPU usage around 46% for the whole process

Shell# time du -s --si BorgMount/20170911-181622/
138G BorgMount/20170911-181622/

real 5m30.143s
user 0m0.864s
sys 0m4.956s

NOTE: CPU usage at 100% for the whole process

  • BORG is about 5x slower to get the same information

BORG vs RESTIC trying to backup while having mounted archives :

NOTE: Typical use case would be trying to restore a very big file in a very
nested/complex directory hierarchy that would make this impractical using
the "extract/restore" command. Retrieving the said file would be so time
consuming that it would overlap with the next scheduled backup for example.

Shell# ./borg-linux64 create --info --stats --progress
/path/to/BackupTests/Borg::{now:%Y%m%d-%H%M%S} /path/to/Mail/
Failed to create/acquire the lock /path/to/BackupTests/Borg/lock (timeout).

Shell# ./restic_0.7.1_linux_amd64 -r /path/to/BackupTests/Restic backup
/path/to/Mail/
enter password for repository:
using parent snapshot 6c90edf6
scan [/path/to/Mail]
scanned 2327 directories, 665655 files in 0:03
[0:38] 100.00% 3.518 GiB/s 136.039 GiB / 136.039 GiB 667982 / 667982
items 0 errors ETA 0:00
duration: 0:38, 3581.52MiB/s
snapshot 64106e49 saved

NOTE: Here the Restic design have a clear advantage. Quoting the doc : "All
files in a repository are only written once and never modified afterwards.
This allows accessing and even writing to the repository with multiple
clients in parallel".

Features I like in Restic :

  • Nothing is written outside the repository
  • The "views" on mounted repositories (host, snapshots and tags)
  • Multiple "keys" per repository (like LUKS)

Features I DISLIKE in Restic :

  • The "mount" command blocks the shell and waits for "CTRL-C" to end.
    Trying to unmount while mountpoint is busy (ie: cd /path/to/mountpoint in a
    different shell) ends up badly :
    "unable to umount (maybe already umounted?): exit status 1: fusermount:
    failed to unmount /path/to/BackupTests/ResticMount: Device or resource busy"
    and needs manual intervention. Borg also complains but a second invocation
    to "umount" command works once the "business" state is lifted.
  • No support for sparse files (AFAIK) which makes it not usable for VM
    images and such.

Features I DISLIKE in Borg :

  • Writes several files OUTSIDE the repository, ~/.config/borg and
    ~/.cache/borg and AFAIK, there's no option to use another paths for these
    files.
  • The "several seconds or more" delays when mounting repositories and
    scanning deeper directories.

I can live with the delays but I really wish there was an option to
relocate the ".config" and ".cache" data. I need this because it makes it
easier to copy the data offsite without forgetting anything! I know that
".cache" is disposable bug having this data available when restoring in
case of disaster recovery is a huge gain of time.

Features I DISLIKE in BOTH tools :

  • Their design geared at "backup-and-push-to-repository" which is nice but
    not desired in my environment. I need a
    "repository-pulls-backup-from-agent" design. There could be in both tools
    an additional "agent" command that would :

    • Use ssh transport by default to contact an host and the ssh keys
      benefits (authorized keys, )
    • Spawn a Borg/Restic instance to make the backup on the remote host
      (like a normal Borg call) but feed the result back to the calling Borg,
      which holds the repository
    • A way to securely transmit the repokey data to the remote instance so
      the local Borg can mount/check the local repository

    Of course, it would be of the administrator responsability to setup
    everything accordingly to use either one repokey for every remote host or
    script something a bit smarter to use a repokey per host or group of hosts,
    whatever suits the needs.

    Why such a setup?

    Because, in my case at least, the backup server is of critical importance
    and network isolated from the other hosts. I really don't want the
    "all-hosts-can-contact-the-backup-server" style but the
    "only-backup-server-can-contact-hosts" kind of behavior. This also helps to
    limit the strain on the backup server. Having all the hosts, with no
    predictable backup size, hammering the backup server at the same time
    (cronjob) is not desirable, especially on sites with storage on budget :-)

    For instance, I currently use a very spartan/crude system but which is
    rock solid and never failed once in over two decades. A simple script
    which, in sequence, connects via SSH to each host and uses the remote tar
    command to perform the backup. SSH's piped stdout/stderr allows to retrieve
    the tarball as well as errors and act accordingly. This is not scalable but
    highly effective, battle tested and disaster recovery proven! Booting a new
    server with some rescue OS and restoring from a tarball works in ALL
    conditions, no matter how long it takes :-) But now, I need encryption and
    deduplication given the huge sizes of the data to backup, hence my tests
    with Borg/Restic which both have nice features AND provide a single file
    binary for disaster scenarios.

Install Open SSH on Windows with Chocolatey

#To install openssh with ssh daemon
choco install openssh -params '"/SSHServerFeature"' -y

#To enable ssh keyauth
Restart Windows

#To setup ssh keys
https://github.com/PowerShell/Win32-OpenSSH/wiki/ssh.exe-examples
cd ~
ssh-keygen.exe -t rsa -f id_rsa
copy id_rsa.pub .ssh\authorized_keys