Skip to content

Instantly share code, notes, and snippets.

View babeuloula's full-sized avatar
💀

Jérémy babeuloula

💀
View GitHub Profile
@babeuloula
babeuloula / in_arrayi.php
Last active April 5, 2018 21:24 — forked from sepehr/in_arrayi.php
PHP: Case-insensitive in_array()
<?php
/**
* Case-insensitive in_array() wrapper.
*
* @param mixed $needle Value to seek.
* @param array $haystack Array to seek in.
* @param bool $strict If the third parameter strict is set to TRUE then the in_array() function will also check the types of the needle in the haystack.
*
* @return bool
@babeuloula
babeuloula / .bashrc
Created April 18, 2019 11:10
Better bash
PS1='$(for (( i=0; i<$COLUMNS; i++ )); do echo -n '_'; done;)\n[\033[31m\u@\h\033[00m] [\033[32m\w\033[00m]\n\$ '
@babeuloula
babeuloula / .htaccess
Created August 15, 2019 15:11 — forked from Guibzs/.htaccess
Symfony 4 ~ .htaccess
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
<IfModule !mod_rewrite.c>
<IfModule mod_alias.c>
RedirectMatch 302 ^/$ /index.php/
@babeuloula
babeuloula / .bashrc
Last active December 14, 2022 13:02
My bashrc
# PROMPT COLOURS
BLACK='\[\e[0;30m\]' # Black - Regular
RED='\[\e[0;31m\]' # Red - Regular
GREEN='\[\e[0;32m\]' # Green - Regular
YELLOW='\[\e[0;33m\]' # Yellow - Regular
BLUE='\[\e[0;34m\]' # Blue - Regular
PURPLE='\[\e[0;35m\]' # Purple - Regular
CYAN='\[\e[0;36m\]' # Cyan - Regular
WHITE='\[\e[0;37m\]' # White - Regular
BLACK_BOLD='\[\e[1;30m\]' # Black - Bold
@babeuloula
babeuloula / tilix.conf
Created January 13, 2020 15:17
Tilix configuration file
[/]
warn-vte-config-issue=false
prompt-on-close=true
recent-session-files=['/home/jeremy/test']
prompt-on-delete-profile=true
[profiles/66264601-9fd3-4d3c-9f31-d979c5a71a8d]
cursor-shape='ibeam'
cursor-colors-set=false
bold-color-set=false
@babeuloula
babeuloula / AuthyToOtherAuthenticator.md
Created July 10, 2021 10:31 — forked from gboudreau/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Generating Authy passwords on other authenticators


There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.

Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes for you to use on your favorite authenticator.

His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My guess is that Brian used the

@babeuloula
babeuloula / .gitlab-ci.yml
Created October 14, 2021 10:57
Gitlab CI with Docker Compose
default:
interruptible: true
retry:
max: 2
when:
- runner_system_failure
stages:
- "Build Docker"
- "Build App"
@babeuloula
babeuloula / didomi-remover.js
Last active January 16, 2023 19:45
Remove Didomi cookie popup
// ==UserScript==
// @name Didomi cookie popup remover
// @version 0.1
// @description Remove didomi cookie popup
// @author BaBeuloula
// @match https://*/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
@babeuloula
babeuloula / bt-color-modes.html.twig
Last active September 14, 2023 16:10
Bootstrap color modes
<!-- start theme selector -->
<div class="dropdown position-fixed bottom-0 end-0 mb-3 me-3 bd-mode-toggle" id="theme-switcher">
<button class="btn btn-primary py-2 dropdown-toggle d-flex align-items-center" id="bd-theme" type="button" aria-expanded="false" data-bs-toggle="dropdown" aria-label="Toggle theme (auto)" spellcheck="false">
<i class="bi bi-lightbulb"></i>
<span class="visually-hidden" id="bd-theme-text">Choix du thème</span>
</button>
<ul class="dropdown-menu dropdown-menu-end shadow" aria-labelledby="bd-theme-text" style="">
<li>
<button type="button" class="dropdown-item d-flex align-items-center" data-bs-theme-value="light" aria-pressed="false" spellcheck="false">
Thème clair
@babeuloula
babeuloula / install_docker.sh
Created September 22, 2023 16:08
Install Docker on NAS Synology AARCH64
#!/bin/bash
set -e
ARCH=aarch64
DOCKER_VERSION="24.0.6"
DOCKER_DIR=/volume2/@docker
echo "Downloading docker $DOCKER_VERSION-$ARCH"
curl "https://download.docker.com/linux/static/stable/$ARCH/docker-$DOCKER_VERSION.tgz" | tar -xz -C /usr/local/bin --strip-components=1