Vue normale

Il y a de nouveaux articles disponibles, cliquez pour rafraîchir la page.
À partir d’avant-hierLes liens que je découvre au fil du Web

I decided to disable AMP on my site

L'AMP c'est une horreur pour tout le monde sauf Google, arrêtez de vous en servir s'il vous plait.
C'est mauvais pour les utilisateurs, mauvais pour la vie privée, mauvais pour les créateurs de contenu, mauvais pour les publicitaires.
Si les devs web faisaient leur boulot, les pages seraient déjà légères, responsive, et rapides à exécuter, sans avoir besoin de charger un JS supplémentaire depuis les serveurs de Google (vie privée : 0), en étant enfermé dans la "galaxie" Google et en ne voyant qu'un web réduit venant directement du cache de Google (oui, s'il y a "Google" un peu trop de fois dans la phrase précédente c'est bien qu'il y a un problème).

(Je reposte le lien moi même, mais ça vient (encore) de Sam&Max https://twitter.com/sam_et_max/status/879295680115871744)
Permalink

localfont.com - Download fonts from googlefonts - Liens en vrac de sebsauvage

Je ne comprends pas pourquoi tout le monde galère à télécharger les Google Fonts, ça prend littéralement 3 clics :

  1. Ajouter la police au "panier" avec le petit +
  2. Cliquer sur la barre noir en bas qui liste tout ce qu'on a sélectionné
  3. Cliquer sur le bouton Download en haut à droite

Pourquoi avoir besoin d'outils extérieurs ?

EDIT : ah, j'avais été battu par https://www.ecirtam.net/opennews/?-zL50A ^^ (vu sur la rivière)
Permalink

Firefox/Profile on RAM - ArchWiki

Après avoir lu un article sur Spotify qui écrit comme un fou sur le SSD, et m'être souvenu d'un autre article pointant le même problème à propos de Firefox, j'ai regardé rapidement : 300ko/s en continu par Firefox ! Pas étonnant que j'écrive 2.5Go/h en moyenne...

Du coup je teste le profil en RAM, merci le wiki ArchLinux <3

(Copie pour la postérité)

Place profile in RAM manually

Before you start

Before potentially compromising Firefox's profile, be sure to make a backup for quick restoration. Replace xyz.default as appropriate and use tar to make a backup:

$ tar zcvfp ~/firefox_profile_backup.tar.gz ~/.mozilla/firefox/xyz.default

The script

Adapted from verot.net's Speed up Firefox with tmpfs

The script will first move Firefox's profile to a new static location, make a sub-directory in /dev/shm, softlink to it and later populate it with the contents of the profile. As before, replace the bold sections to suit. The only value that absolutely needs to be altered is, again, xyz.default.

Be sure that rsync is installed and save the script to ~/bin/firefox-sync, for example:

#!/bin/sh

static=main
link=xyz.default
volatile=/dev/shm/firefox-$USER

IFS=
set -efu

cd ~/.mozilla/firefox

if [ ! -r $volatile ]; then
    mkdir -m0700 $volatile
fi

if [ "$(readlink $link)" != "$volatile" ]; then
    mv $link $static
    ln -s $volatile $link
fi

if [ -e $link/.unpacked ]; then
    rsync -av --delete --exclude .unpacked ./$link/ ./$static/
else
    rsync -av ./$static/ ./$link/
    touch $link/.unpacked
fi

Close Firefox, make the script executable and test it:

$ killall firefox firefox-bin
$ chmod +x ~/bin/firefox-sync
$ ~/bin/firefox-sync

Run Firefox again to gauge the results. The second time the script runs, it will then preserve the RAM profile by copying it back to disk.

Automation

Seeing that forgetting to sync the profile can lead to disastrous results, automating the process seems like a logical course of action.

cron job

Manipulate the user's cron table using crontab:

$ crontab -e

Add a line to start the script every 30 minutes,

*/30 * * * * ~/bin/firefox-sync

or add the following to do so every 2 hours:

0 */2 * * * ~/bin/firefox-sync

Sync at login/logout

Assuming bash is being used, add the script to the login/logout files:

$ echo '~/bin/firefox-sync' | tee -a ~/.bash_logout ~/.bash_login >/dev/null

Note: You may wish to use ~/.bash_profile instead of ~/.bash_login as bash will only read the first of these if both exist and are readable.

Note de moi-même : avec zsh, ce sont les fichiers .zlogin et .zlogout.
Permalink

Managing multiple Rails versions | relativkreativ

Rails avec rbenv, je garde sous le coude...

Créer un dossier, faire rbenv local <version voulue> pour créer le fichier .ruby-version.
Installer ensuite bundler avec gem install bundler.
Initialiser le Gemfile avec bundle init, puis décommenter # gem "rails". Installer rails avec bundle install.

Enfin, créer le projet rails dans le dossier courant (rails new . --force --skip-bundle). et mettre à jour les dépendances (bundle update).
Permalink

Optical Adjustment – Logic vs. Designers - Marvel

Très intéressant, à propos des illusions dans le design.

Exemple simple : le symbole « lecture » () dans un cercle ne doit pas être centré.
À cause de son assymétrie, il aura l’impression d’être plutôt à gauche. La solution est de l’excentrer un peu.

Il y a plusieurs autres exemples

via http://lehollandaisvolant.net/
Permalink

Is there a way to disable a laptop's internal keyboard? - Ask Ubuntu

Pour quand je veux poser mon clavier mécanique sur le clavier de l'ordi portable...
http://askubuntu.com/a/178741/563871 (recopiée pour la postérité)


You can use xinput to float the input device under X.

Execute the command xinput list to list your input devices.
Locate AT Translated Set 2 keyboard and take note of its id number; this will be used to disable the keyboard. Also, take note of the number at the end, [slave keyboard (#)]; this is the id number of the master, which will be used to re-enable your keyboard.
To disable the keyboard, execute the command xinput float <id#>, where <id#> is your keyboard's id number. For example, if the id was 10, then the command would be xinput float 10.
To re-enable the keyboard, execute the command xinput reattach <id#> <master#>, where master is that second number we noted down. So if the number was 3, you would do xinput reattach 10 3.

Permalink

WikiJourney - Revisitez le tourisme.

La version 2 de WikiJourney est déployée ! Avec un joli design responsive et les perfs de l'API surboostées !
Allez tester, ça vaut le coup !

Vous pouvez en lire un peu plus ici https://blog.wikijourney.eu/index.php?article18/website-is-in-v2-0, et nous aider à développer là https://github.com/WikiJourney/.
(L'appli arrivera prochainement sur F-Droid, une Merge Request à finir...)
Permalink

GitHub - martingeorg/tmpfs-mysql: Speed up your tests using MySQL server with tmpfs datadir

Je me note ça ici, pour ceux qui bossent avec une base MySQL et veulent des tests ultra rapides (en tout cas, non limités par la BDD).
C'est un script tout fait tout propre, qui crée un RAM disk et charge MySQL dessus. C'est du no-brain et ça fait le café avec ^^
Permalink

❌
❌