Skip to content

Instantly share code, notes, and snippets.

View laruiss's full-sized avatar
🏠
Working from home

Stanislas Ormières laruiss

🏠
Working from home
View GitHub Profile
@laruiss
laruiss / AppHeader.vue
Created January 3, 2024 17:43
DsfrHeader avec extra slots
<script lang="ts" setup>
import { computed, onMounted, onUnmounted, ref, useSlots } from 'vue'
import { DsfrLogo, DsfrSearchBar, DsfrHeaderMenuLinks, type DsfrHeaderProps } from '@gouvminint/vue-dsfr'
const props = withDefaults(defineProps<DsfrHeaderProps>(), {
serviceTitle: undefined,
serviceDescription: undefined,
homeTo: '/',
logoText: () => 'Gouvernement',
@laruiss
laruiss / .zshrc
Created November 30, 2023 10:58
ZSH ssh-agent
# Check for a currently running instance of the agent
RUNNING_AGENT="`ps -ax | grep 'ssh-agent -s' | grep -v grep | wc -l | tr -d '[:space:]'`"
echo "RUNNING_AGENT: $RUNNING_AGENT"
if [ "$RUNNING_AGENT" = "0" ]; then
# Launch a new instance of the agent
ssh-agent -s &> ~/.ssh/ssh-agent
fi
eval `cat ~/.ssh/ssh-agent`
@laruiss
laruiss / .zshrc
Last active November 30, 2023 10:57
ZSH Completion
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="${HOME}/.oh-my-zsh"
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if test -n "${USE_P10K-}"; then
@laruiss
laruiss / nginx.conf.erb
Created October 14, 2022 17:54
Scalingo Nginx config
# Static files directory
root <%= ENV['STATIC_DIR'] || '/usr/share/nginx/html' %>;
index index.html;
location / {
try_files $uri $uri/ /index.html =404;
}
location /api {
rewrite "^(.*)$" $1 break;
@laruiss
laruiss / 3-file-combo.conf
Created October 14, 2022 17:53
config nginx total
# nginx.conf
user nginx;
worker_processes auto;
error_log /dev/stdout info;
pid /var/run/nginx.pid;
events {
# Path to your oh-my-zsh installation.
export ZSH=${HOME}/.oh-my-zsh
# Set up the prompt
autoload -Uz promptinit
promptinit
# prompt adam1
setopt histignorealldups sharehistory
# Use emacs keybindings even if our EDITOR is set to vi

Keybase proof

I hereby claim:

  • I am laruiss on github.
  • I am stormier (https://keybase.io/stormier) on keybase.
  • I have a public key ASCN1r13qrJfr2WmdPabbtDSZ48D_s_KkhwGcWNuaOWQ1Qo

To claim this, I am signing this object:

stormier Stanislas Ormières Paris

Keybase proof

I hereby claim:

  • I am laruiss on github.
  • I am stormier (https://keybase.io/stormier) on keybase.
  • I have a public key ASCN1r13qrJfr2WmdPabbtDSZ48D_s_KkhwGcWNuaOWQ1Qo

Devoir à rendre

L'énoncé peut paraître long, mais rassurez-vous, ce sera en fait assez court (pour ceux qui m'ont écouté, en tout cas). Lisez l'énoncé entièrement, ne vous arrêtez pas à "Bonus", il y a des rappels importants à la toute fin.

Créer une page de formulaire pour qu'un utilisateur puisse laisser un message directement depuis la page

Note préalable

L'utilisation de jQuery est totalement facultative.

// Split the code between 'vendors' which will contain all the
// modules from node_modules and 'main' which will contain our code
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks(module) {
return module.context && module.context.includes('node_modules');
},
}),
new webpack.optimize.CommonsChunkPlugin({
name: 'manifest',