Skip to content

Instantly share code, notes, and snippets.

View jprivet-dev's full-sized avatar

J.P. RIVET jprivet-dev

View GitHub Profile
@jprivet-dev
jprivet-dev / emulated-devices.md
Last active May 27, 2024 14:35
Emulated Devices - Customised devices for testing responsive behaviour in Chrome or Firefox devtools.

Emulated Devices

Customised devices for testing responsive behaviour in Chrome or Firefox devtools.

Chrome Emulated Device Label Viewport Width (px) Viewport Height (px) Physical Width (px) Physical Height (px) Device Pixel Ratio Type Dual Screen Ratio W/H
01. Bootstrap 375px - xs <576px (iPhone 6/7/8/X) 375 1000 375 1000 1.0 Mobile FALSE 0.38
02. Bootstrap 575px - xs <576px 575 1000 575 1000 1.0 Desktop FALSE 0.58
03. Bootstrap 576px - sm ≥576px 576 1000
@jprivet-dev
jprivet-dev / StringUtil.php
Last active January 12, 2023 21:32
PHP - Tips
<?php
declare(strict_types=1);
namespace App\Util;
abstract class StringUtil
{
/**
* Replace the accents in a string.
@jprivet-dev
jprivet-dev / kde-memento.adoc
Last active July 22, 2022 12:22
KDE Memento
:toc: macro
:toc-title: Summary
:toclevels: 3
:numbered:
ifndef::env-github[:icons: font]
ifdef::env-github[]
:status:
:outfilesuffix: .adoc
:caution-caption: :fire:
@jprivet-dev
jprivet-dev / README-with-toc-and-back-to-top.adoc
Last active March 25, 2024 09:33
README.adoc for GitHub project (startup Asciidoctor template)
:toc: macro
:toc-title: Summary
:toclevels: 3
:numbered:
ifndef::env-github[:icons: font]
ifdef::env-github[]
:status:
:outfilesuffix: .adoc
:caution-caption: :fire:
@jprivet-dev
jprivet-dev / composer-generate-a-github-oauth-token.md
Last active December 9, 2021 15:58
Composer: Generate a Github Oauth token for privately hosted packages and repositories

Composer: Generate a Github Oauth token for privately hosted packages and repositories

Generate your personal access token

. Generate a new personal access token https://github.com/settings/tokens/new . Copy your token ghp_mytoken

Generate your auth.json

@jprivet-dev
jprivet-dev / gdg-toulouse-faire-du-redux-avec-angular-et-ngrx-v4-bruno-baia.adoc
Last active August 18, 2021 08:11
[Mémo] GDG Toulouse - Faire du Redux avec Angular et NgRx v4 (Bruno Baia)
:toc: macro
:toc-title: Sommaire
:toclevels: 3
:numbered:
:IMAGES_DIR_1:
:IMAGES_DIR_2:
:IMAGES_DIR_3:
ifndef::env-github[:icons: font]
ifdef::env-github[]
@jprivet-dev
jprivet-dev / global-gitignore-file.adoc
Last active March 20, 2023 16:39
Set up a global .gitignore file to avoid committing IDEs, editors and system files.

Global .gitignore file

Set up a global .gitignore file to avoid committing IDEs, editors and system files.

Step #1 - Create an empty global file

$ touch ~/.gitignore_global
@jprivet-dev
jprivet-dev / transfert-gist-into-github-repository.md
Last active September 30, 2023 22:16
Transfer a Gist into a new GitHub repository

Transfer a gist into a new GitHub repository

1) Create an empty repository on GitHub

Create a new repository on GitHub (in my case git-and-bash-aliases).

To avoid errors, do not initialize the new repository with README, license, or gitignore files. You can add these files after your project has been pushed to GitHub.

2) Clone the gist

@jprivet-dev
jprivet-dev / .bash_aliases
Last active June 22, 2024 06:33
Git and Bash aliases defined and documented in a single `.bash_aliases` file, with Git auto-completion
# #########################################################################################
# GIT AND BASH ALIASES DEFINITION IN A SINGLE FILE `.BASH_ALIASES` WITH GIT AUTO-COMPLETION
# #########################################################################################
# All these git commands and bash aliases are tested on git version 2.17.1 on Linux Mint 19
# This compilation of aliases is an experiment.
# On a daily basis, I use only a few of these aliases ¯\_(ツ)_/¯
# **********
@jprivet-dev
jprivet-dev / shorcuts-phpstorm-chrome-and-others.adoc
Last active June 5, 2022 15:48
Shorcuts (PHPStorm, Chrome, ...)
:toc: macro
:toc-title: Table of contents
:toclevels: 3
:numbered:
:experimental:
:BACK_TO_TOP_TARGET: top-target
:BACK_TO_TOP_LABEL: ⬆ Back to top
:BACK_TO_TOP: <<{BACK_TO_TOP_TARGET},{BACK_TO_TOP_LABEL}>>