Golang pretty print

A quick snippet to get some nicer debug of json and other mapped values. //PrettyPrint print any interface func PrettyPrint(data interface{}) (err error) { indentedData, err := json.MarshalIndent(data, "", " ") if err == nil { fmt.Println(string(indentedData)) } return }

October 11, 2021 · 1 min · YS

Medium-like online Editors

We need a better online editing experience Blog writing should be about writing and not about trying to figure out how your web text editor is working. One of the reason why Medium was so successful was the user experience of the editor. Editor JS https://editorjs.io/ Simple, straight forward, very light Interesting features with close to 20 plugins extending base functionalities. Headings Paragraph Tables Images Code snippets Lists Audio quote etc....

April 1, 2020 · 2 min · Johann Savalle

Text Expander for Linux

The quest for Text Expander - but for linux If you come from the world of mac or windows, you probably heard and used Text Expander but unfortunately, there is no version of it for Linux and anyway it is not open source. So here are my 2 findings: Ulauncher Extension Text Expander Source : Github LeehBlue Text expander for linux Source : GitHub I personnaly now use the second one (combined with a shortcut with Ulauncher) - works perfect!...

January 14, 2020 · 1 min · Johann Savalle

Webcam Config - Logitech on Ubuntu - Change frequency to 50Hz

v4l-utils v4l-utils is a series tools on Linux to manage your media devices (webcam, IR devices, etc.) We are gonna need v4l2-ctl Install it first : #Install sudo apt-get install v4l-utils #List devices v4l2-ctl --list-devices #Check your device v4l2-ctl -d /dev/video2 --list-ctrls #Modifiy frequency # power_line_frequency=1 50Hz # power_line_frequency=2 60Hz v4l2-ctl -d /dev/video2 --set-ctrl=power_line_frequency=1

December 18, 2019 · 1 min · Johann Savalle

WordPress with Composer - Part 1

https://davidwinter.dev/install-and-manage-wordpress-with-composer/ This is the killer workflow for WordPress, or at least the key element to build one. Part 1: Composer and WordPress Part 2 (in the work): WordPress and Git 1. What is Composer Composer is a great tool to manage your PHP dependencies. You probably already know about it if you are used to working with PHP. Composer is to PHP what npm is to javascript or pip is to Python....

August 14, 2019 · 3 min · Johann Savalle

How to make WordPress Multisite development-ready

A quick intro In this article, we will delve into the specifics of turning a running WordPress Multisite in production into a well organised, development-ready, version control, dev/staging environnment, as well as the deployment process (not automatic for now). Context Recently, I had to create a local/staging/production environnement for a rather large WordPress Multisite instance. The process was not that obvious at first so I created documention for it here, for my future self, as well as for probably other people in similar situations....

August 3, 2019 · 5 min · Johann Savalle

List of libraries to build cool NodeJS command lines apps

1. Chalk Chalk is styling for the command line - add cool color and stuff. const chalk = require('chalk'); const log = console.log; log(chalk.blue('Hello') + ' World' + chalk.red('!')); log(chalk.green( 'I am a green line ' + chalk.blue.underline.bold('with a blue substring') + ' that becomes green again!' )); 2. Clear Clear the terminal screen if possible var clear = require('clear'); clear(); 3. Commander (minimist/nomnom/etc.) Argv on steroid - basically handle all the needs of of your cli parameters...

July 30, 2019 · 2 min · YS

Forms in React with Formik

In react, forms are quite a verbose and painful thing to write.

July 26, 2019 · 1 min · Johann Savalle

Uncomplete list of recommended youtube channels

Coding & tech Coding Tech The best of all tech conferences currated for you in one youtube channel. High quality content on all kind of computing topics. Traversy Media One of the best individuals producing coding tutorials on trending stacks. FreeCodeCamp.org The best free academy for coding. I shall make a post just dedicated to this project. Fireship...

March 1, 2019 · 1 min · YS

TITLE

Place your content here Better Wordpress Development not your typical guide to build a theme or plugin but more how to to build a solid worflow to keep your data safe and avoid bad surprises. plugin updates in production working multiple developpers ensure testing work with version control add automation to your wokflow Wordpress is just one specific way to get data into and out of a database, display it as HTML, and link up your CSS/JS....

1 min · Johann Savalle