Skip to content

Instantly share code, notes, and snippets.


Julien Maury jmau111

Block or report user

Report or block jmau111

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jmau111 /
Created May 19, 2019
open current folder from terminal on Linux
nautilus `pwd`
jmau111 /
Created Apr 22, 2019
Make Prism js work with React

Because we love Prism but it does not work AS IS when in a React context.

import Prism from 'prismjs';

class MyComponents extends Component {
  componentDidMount() {
jmau111 /
Last active Mar 17, 2019
Linux : alias start|stop|restart Apache, Mysql, Elasticsearch, Redis

Open ~/.bashrc :

sudo nano ~/.bashrc

and insert :

jmau111 /
Created Mar 3, 2019
Install and set kindlegen on Linux to generate .mobi files for your Kindle
  1. Go here and download your archive (depending on your operating system)
  2. extract the folder e.g at the root of your path "~/"
  3. open terminal and enter :

cd ~/kindlegen

then you can run :

kindlegen /PATH/TO/youEpub.epub

jmau111 / remove-noto.php
Created Jan 26, 2019
WordPress - Gutenberg - dequeue the default editor font Noto Serif
View remove-noto.php
add_action( 'wp_enqueue_scripts', 'jmau_remove_noto_from_frontend' );
function jmau_remove_noto_from_frontend() {
global $wp_styles;
$wp_styles->remove( 'wp-editor-font' );
jmau111 / gutenberg-i18n-example.php
Last active Dec 9, 2018
Gutenberg i18n : example in real life
View gutenberg-i18n-example.php
* Replace "text-domain" with your text domain, it's just the i18n load part
class Gutenberg_i18n_Example {
public function hooks() {
add_action( 'enqueue_block_editor_assets', [ $this, 'scripts_register' ] );
add_action( 'enqueue_block_assets', [ $this, 'scripts_enqueue' ] );
jmau111 / featured-image.js
Created Dec 8, 2018
Get featured image object in Gutenberg WordPress
View featured-image.js
jmau111 /
Created Sep 23, 2018
Cannot connect to the Docker daemon at unix:///var/run/docker.sock

In case you have this stupid error. Google leads you to the following :

  1. maybe you tried this stackoverflow OWNERSHIP documentation
  2. maybe you tried this stackoverflow CONFIG Override
  3. hopefully you did not try the "uninstall / install" thing even if it's often recommanded as a "good" solution... which is not and cannot be.

Of course this can solve your case (except 3.) and I'm not saying this gist is the ultimate solution but that might be something related to a config file that just disapeared (this never happens so you probably made some mistake by copy/pasting commands).

In my case there was a problem in the /etc/systemd/system/docker.service.d folder. You have to have a file called `docker.c

jmau111 /
Created Aug 10, 2018
Bower, fix error permission denied

sudo chown -R $USER:$GROUP ~/.npm && sudo chown -R $USER:$GROUP ~/.config

jmau111 / dashMADicons.php
Created Jun 23, 2018
Dashicons going crazy (⊙_◎)
View dashMADicons.php
* Plugin Name: Randomize Dashicons
* Description: why not ? Do you understand all icons ? Let's make it almost impossible to understand ^^
* Version: 0.73
* Author: Julien Maury
defined( 'ABSPATH' )
or die( 'No' );
You can’t perform that action at this time.