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
# controllers/catalogs_controller.rb | |
def show | |
@catalog = Catalog.includes(article_publications: [:article]).find(params[:id]) | |
logger.debug "Debugging: showing catalogs #{@catalog.id}" | |
logger.info "Info: showing catalogs #{@catalog.id}" | |
logger.warn "Warn: showing catalogs #{@catalog.id}" | |
# add some tagged logs here | |
logger.tagged("Catalogs show") { logger.debug "Moar stuff" } | |
logger.tagged("Catalogs show") { logger.info "Stuff" } | |
logger.tagged("Catalogs show") { logger.tagged("Nested tag") { logger.info "Stuff" } } |
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
# Testing colours printing on VisualStudio console and PowerShell to check how | |
# colours are represented. This is for choosing color scheme of logging library | |
# Constants source: https://github.com/TwP/logging/blob/master/lib/logging/color_scheme.rb | |
module Color | |
# Miscellaneous stuff | |
module Misc | |
# Embed in a String to clear all previous ANSI sequences. This *MUST* be | |
# done before the program exits! | |
CLEAR = "\e[0m".freeze |
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
Get-ChildItem | Rename-Item -WhatIf -NewName {$_.Name -replace '(\d{2})-(\d{2})-(\d{4})', '$3-$2-$1' } |
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
foreach($song in (Get-ChildItem -Recurse -Filter *acoustic*.mp3)){vlc $song.FullName} |
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 | |
# ---------- Help | |
# https://stackoverflow.com/a/51911626/4906586 | |
__help=" | |
Usage: | |
./load.sh --awsBuckets=pouet --awsProfile=MyProfile --parser=../haha | |
Options: | |
-b, --awsBuckets=<buckets> list of buckets to load from AWS. If |
Source: https://www.academiedugout.fr/recettes/gateau-a-la-poudre-damandes_6919_4
- Poudre d'amande: 150gr
- Oeuf: 3
- Sucre cassonade: 80gr
- Beurre: 75gr + qq pour le moude
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
# AWS CloudFormation template file follows the following anatomy: | |
# https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html | |
# More documentation in the API reference: | |
# https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/Welcome.html | |
# As-of 2020, "2010-09-09" is the latest FormatVersion: | |
# https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/format-version-structure.html | |
AWSTemplateFormatVersion: 2010-09-09 | |
Description: S3 / Route53 / CloudFront CloudFormation configuration |