Skip to content

Instantly share code, notes, and snippets.

🏄
surfing

Julien Maury jmau111

🏄
surfing
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
jmau111 / bl2_dlc.md
Last active Aug 11, 2019
How to play Lilith and the Fight for Sanctuary Borderlands 2 DLC on Linux
View bl2_dlc.md

Well, don't play on Linux

Trust me, it's full of bugs and a little bit limited. Don't get me wrong, I love this game and it's very cool that we can actually play this on Linux. But at the end of the day the gaming experience is not great on Linux.

WITH THIS METHOD YOU WON'T LOSE YOUR PROGRESSION. This is really important cause this game is fun but takes a lot of time, especially if you want to reach the highest levels. I mean you have to spend a ridiculous amount of time to get all the quests and stuffs no matter what you do and even with some skills and speed run.

Why ?

@jmau111
jmau111 / cmd.md
Created May 19, 2019
open current folder from terminal on Linux
View cmd.md
nautilus `pwd`
@jmau111
jmau111 / prism-react.md
Created Apr 22, 2019
Make Prism js work with React
View prism-react.md

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() {
    Prism.highlightAll();
@jmau111
jmau111 / alias-stack-local.md
Last active Mar 17, 2019
Linux : alias start|stop|restart Apache, Mysql, Elasticsearch, Redis
View alias-stack-local.md

Open ~/.bashrc :

sudo nano ~/.bashrc

and insert :

@jmau111
jmau111 / ePubToMobiKindle.md
Created Mar 3, 2019
Install and set kindlegen on Linux to generate .mobi files for your Kindle
View ePubToMobiKindle.md
  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
jmau111 / remove-noto.php
Created Jan 26, 2019
WordPress - Gutenberg - dequeue the default editor font Noto Serif
View remove-noto.php
<?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
jmau111 / gutenberg-i18n-example.php
Last active Dec 9, 2018
Gutenberg i18n : example in real life
View gutenberg-i18n-example.php
<?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
jmau111 / featured-image.js
Created Dec 8, 2018
Get featured image object in Gutenberg WordPress
View featured-image.js
@jmau111
jmau111 / fix-docker-daemon.md
Created Sep 23, 2018
Cannot connect to the Docker daemon at unix:///var/run/docker.sock
View fix-docker-daemon.md

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
jmau111 / bower.md
Created Aug 10, 2018
Bower, fix error permission denied
View bower.md

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

You can’t perform that action at this time.