This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Advent of Code template by @MathisHammel | |
import requests | |
from aoc_secrets import AOC_COOKIE # Put your session cookie in this variable | |
YEAR = '2022' | |
def get_input(day): | |
req = requests.get(f'https://adventofcode.com/{YEAR}/day/{day}/input', headers={'cookie':'session='+AOC_COOKIE}) | |
return req.text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let mapleader=" " | |
""" Plugins -------------------------------- | |
set surround | |
set multiple-cursors | |
set commentary | |
set argtextobj | |
set easymotion | |
set textobj-entire | |
set ReplaceWithRegister |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
La première étape consiste à sélectionner la distribution système Debian 10 dans le menu déroulant lors de la commande de votre nouveau Serveur dédié / VPS chez votre hébergeur préféré.
Procédez ensuite à l'installation de votre serveur avec les paramètres par défaut et veillez à ne pas personnaliser la répartition de l'espace disque des partitions systèmes.
Une fois l'installation effectuée, connectez-vous au serveur en SSH avec les identifiants que vous aurez normalement reçus par mail (en toute logique le login par défaut est debian
, s'il ne s'agit pas là dans certains cas des identifiants root
.)
-- pas de soucis, l'utilisateur par défaut fait dans une grande majorité des cas déjà parti des sudoers système. --
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
set -u | |
clear | |
ami="ami-10e00b6d" | |
size="t2.medium" | |
today=$(date +"%m-%d-%y-%H%M") | |
localip=$(curl -s https://ipinfo.io/ip) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // You probably don't need to add this opening PHP tag! | |
function my_custom_canvas_scripts() { | |
$classes = get_body_class(); | |
if ( in_array( 'page-template-elementor_canvas', $classes ) ) { ?> | |
<script type="text/javascript"> | |
<!--[Custom Script]><!--> | |
//(function($) { //Uncomment this for no conflict jQuery | |
// Add your script here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
NewerOlder