When we follow the guide to build a new smarthome skill, it gives the steps to create a function in the online code editor. But if you prefer to use the ASK CLI, there is some steps to follow… I first create a fake skill with ask new (using the « hello world » and « AWS Lambda » […]
Auteur/autrice : Aymeric
Detect mobile in JavaScript
We could simply check the resolution or user agent: const isMobile = Math.min(window.screen.width, window.screen.height) < 768 || navigator.userAgent.indexOf("Mobile") > -1;
Add a domain to a Let’s Encrypt certificate
For Apache, in the folder sites-available, you need to create your the-new-one.your-domain.com.conf file. Then enable the new site with a2ensite the-new-one.your-domain.com. You can list all domains associated with a certificate: certbot certificates Now we add the SSL using certbot. You need to list all the existing domains and add the new one: certbot –apache –cert-name […]
Get email address from a Azure DevOps « by » field in Power Apps Flow
If you need to get an email from an Azure DevOps work item (e.g. from the « Changed By » field), it might be tricky in Power Apps Flow because it will return « John Doe <john@doe.com> ». To only extract the email from this string, you’ll have to use the below: first(split(last(split([YOUR_FIELD], »))
Use CTRL and TAB to switch between two tabs in Chrome
It’s super handy to be able to switch between two tabs in the web browser… But it’s tricky to set it up in Chrome! Install AutoControl: Keyboard shortcut, Mouse gesture Install the native component as the extension asks for Add a new action The trigger is LEFT CTRL and TAB The action is Switch to […]
Mise à jour d’un serveur Kimsufi (OVH) depuis Debian 10 (Buster) vers Debian 11 (Bullseye)
Il faut régulièrement penser à mettre à jour son serveur Kimsufi. Je vais essayer d’expliquer brièvement les étapes à suivre pour cela. On vérifie les problèmes liés à la mise à jour. Prévoir une connexion SSH depuis 2 emplacements si possible à cause d’un problème sur SSH durant l’installation. On va effectuer une mise à […]
Portable version of NodeJS on Windows
(This is a corrected version of this blog post) Install Cmder in your desired location. Download nvm-noinstall.zip from the latest release. Extract the contents of nvm-noinstall.zip (i.e.: nvm.exe …) into the bin folder inside of the portable Cmder folder. Navigate to the bin. Create a new file called install_fix.cmd that contains this code. Open a […]
Redirect non-www to www on a PHPBB Forum
In the PHPBB directory, edit the file .htaccess and after RewriteRule ^(.*)$ app.php [QSA,L] you can enter: RewriteCond %{HTTPS} off # First rewrite to HTTPS: # Don’t put www. here. If it is already there it will be included, if not # the subsequent rule will catch it. RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # Now, rewrite […]
Debug a third party Android APK
(inspired by this blog post) 1) Install smalidea plugin Download the smalidea plugin (see also the related Github Repository). Open up Android Studio and you should see the welcome screen like the one on screenshot below (if not, close your current project by selecting File -> Close project), go to the Plugins section, and from […]
Capacitor Plugin for HTTP requests with self-signed SSL certificates
I’m using CapacitorJS for easy development with Android. I needed a way to do an HTTPS request to a box that uses self-signed SSL certificate. To accomplish it, I created my own capacitor plugin. See this wiki page for details: https://github.com/Aymkdn/assistant-freebox-cloud/wiki/Capacitor-Plugin-for-HTTP-requests-with-self-signed-SSL-certificates