Skip to content

Instantly share code, notes, and snippets.

Avatar
❤️

srm syrm

❤️
View GitHub Profile
@syrm
syrm / docker-compose.md
Created Nov 25, 2021
Docker Compose service depends
View docker-compose.md

Alors par avance désolé si c’est connu de tous, je débarque sans doute mais bon. Pour ceux qui utilisent docker-compose vous devez avoir souvent rencontré un soucis de dépendance de démarrage des différents services. Par exemple vous avez un programme qui a besoin que la base de données soit disponible pour se connecter, il faut donc que le service de votre programme se lance après celui de la base de données.

La solution simple que l’on trouve partout est de mettre dans votre docker-compose l’instruction depends_on, ansi vous pouvez avoir quelque chose du genre :

services:
   program:
      build: .
 depends_on:
View docker-compose.yml
version: '3.9'
services:
elasticsearch:
image: "docker.elastic.co/elasticsearch/elasticsearch:7.13.0"
environment:
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
- "discovery.type=single-node"
ports:
- "9200:9200"
View filtered_writer_above.go
package logger
import "github.com/rs/zerolog"
type FilteredWriterAbove struct {
Writer zerolog.LevelWriter
Level zerolog.Level
}
func (w *FilteredWriterAbove) Write(p []byte) (n int, err error) {
View starship.toml
add_newline = false
[php]
disabled = true
symbol = ""
[gcloud]
disabled = true
[aws]
@syrm
syrm / .zshrc
Created Dec 18, 2020
Zsh config with starship
View .zshrc
export HISTFILE=~/.zsh_history
export HISTFILESIZE=1000000000
export HISTSIZE=1000000000
export HISTTIMEFORMAT="[%F %T] "
setopt INC_APPEND_HISTORY
setopt EXTENDED_HISTORY
setopt HIST_FIND_NO_DUPS
bindkey '^R' history-incremental-search-backward
View gist:d44663fa167d00ca79674388c72e0390
eNrtXVtz2zqSfj7-FSxXzb4c2yFuJJhNZkryPfEtki_JeUmBJGgxpkiFpHzJ1u5v3wZJWaRMSpDmnJ152JmqHIlCA-ivG939gSD94R_P48h4lGkWJvHHbbRnbhsy9hI_jO8_bt9cH-3y7X_8fevDlchHl0F_Gkbql79v_fah-GxE8lFGH7dta9vIRXov89tZV-Q7dOWK2A_ziyQdC2h1kcRydu1cpl4YySybXfYikWUXYiw_bg9Hwk-etg2ReTL29-c_XKeh95DlMt02xiKMh4n3IPPjNJlOPm6zbWMi4nwkk_g8jJP0OPFnXb9eFz8a1x9D-XSe-NDx6fnV5eB6Nrf9dCpn0wVVf_twFYkXmQ5zkRsZ_PNxuweIiXt5EubQi4im0AUyTc72LMyxtf1uqdSBGMO_6wgOJ1L6rwJ8j_L_y5ZXqTwMAunl4aPcTwGekYi9-fwJ20Ndohs0P59GeTiJQmXkSgTv2U6XyMmbAQDPrsbXSS6ig6vhXG3GsLWHsG3Rbv1LqWRu6s7-T-_jMJf1Aai9h9mK5gvuwDt1vQvz0dshQAeb7BF7qQ5K9CoJsyTeWH1ttfaTsRvG0l97kjPB3uP9elPspVJcBqWTDoQfTrM5nJ3TPBex2E-yuVm7l18-90VEO60_kD8bLU3c1fJAPs-bYb6kw3pLq3OCp_FcC4LJkv7qLRE3uyf4mOQQxle7_FkY1HwX22RJvPHeq9ansTdXaWm_N3EqM5k-1uIUplRP4gryi6wr6-whyyYY4ObYYcs6Gch7qan5mZTe6BhS0UDkcrWIcrn5jBBaDpZqXQeL0WX9toCFLFNP4g1YFJYqYxZilJFuk6pOmmBR3B3cVes18TqMZXr_MhyFMvJry4DQpbjVper4oe4sUhdpakTsPdPWEWtXDTNrj9mcgM-Rbtc9fBRZfbVhjuzlKpYCde14N_AykhIkfLmQKbtD-AYiV2nyQ9UI0ZpyvXScTNPVvlDoXTauq006g-LV6CULPUhdRX4dSH_q6YW012Ln
View bepo5.c
#include QMK_KEYBOARD_H
#include "version.h"
#include "keymap_bepo.h"
#define BEPO 0
#define L1 1
#define L2 2
#define L3 3
#define GAMING 4
@syrm
syrm / love.php
Last active Mar 14, 2021
Love compatibility test
View love.php
<?php
/**
* Made in 2000 on a TI-92
* Executed again lots of years after for fun (in 2019) with a result of 99% compatibility with my wife.
* So i decided to retranscript it on PHP.
*/
class Person
{
View bepo4.txt
/** BEPO
* ,--------------------------------------------------. ,--------------------------------------------------.
* | $ | " | « | » | ( | ) | | | | @ | + | - | / | * | = |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | B | É | P | O | È | Caps | | | ^ | V | D | L | J | Z |
* |--------+------+------+------+------+------| Lock | | |------+------+------+------+------+--------|
* | Ç | A | U | I | E | , |------| |------| C | T | S | R | N | M |
* |--------+------+------+------+------+------| Esc | | Tab |------+------+------+------+------+--------|
* | Ê | À | Y | X | . | K | | | | ' | Q | G | H | F | W |
* `--------+
View agnoster.zsh-theme
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# Use font : https://github.com/gabrielelana/awesome-terminal-fonts
#
# In addition, I recommend the