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
find /path/to/photos -type f -exec mv -nv -t '/path/to/master' -- {} + | |
# https://stackoverflow.com/questions/19880246/move-only-files-recursively-from-multiple-directories-into-one-directory-with-mv |
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
// HTML tag to listen | |
const header = document.querySelector("[data-header]"); | |
const toggleActiveClassOnScroll = (elem) => { | |
window.addEventListener("scroll", function () { | |
window.scrollY >= 400 ? elem.classList.add("active") : elem.classList.remove("active"); | |
}) | |
} | |
toggleActiveClassOnScroll(header) |
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
// on single element version | |
const toggleActiveClass = (elem) => elem.classList.toggle("active") |
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
' function qui affiche la cle => type(valeur) d'un tableau uni-dimentionnel | |
' ex : prArray(montableau) | |
' [0] => String(jean) | |
' [1] => String(louis) | |
' ... | |
function prArray(myArr) | |
dim key | |
key = 0 | |
for each arrayitem in myArr | |
response.write "[" & key & "]" & " => " & typename(arrayitem) & "(" & arrayitem & ") " & "<br />" |
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
' Declare a variable and affect a string value | |
dim myvariable | |
myvariable = "Donald Duck" | |
' Change a variable value | |
dim myvariable | |
myvariable = "Donald Duck" | |
myvariable = "Mickey Mouse" | |
' Concatenate strings |
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
{ | |
"meta": { "theme": "stackoverflow" }, | |
"basics": { | |
"name": "Nicolas Grissi", | |
"label": "Développeur web", | |
"picture": "", | |
"email": "nicolas.grissi@gmail.com", | |
"phone": "+33685172137", | |
"website": "https://nicolasgrissi.com", | |
"summary": "Véritable névrosé de l'IT, il n'est pas rare que je m'étende longuement sur les dernières librairies disponibles. J'adore apprendre et échanger avec des humains sur tout types de techs jusqu'au DDoS cognitif 😲.", |
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 | |
FROM=iso-8859-1 | |
TO=ASCII//IGNORE | |
ICONV="iconv -f $FROM -t $TO" | |
# Convert | |
find -P ./ -type f -name "*.scss" | while read fn; do | |
cp ${fn} ${fn}.bak | |
$ICONV < ${fn}.bak > ${fn} | |
rm ${fn}.bak | |
done |
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
#rechercher dans le dossier courrant tous les fichier avec l'extension .pdf et les supprimer | |
find . -name "*.pdf" -exec rm {} \; | |
#recherche dans les fichiers de façon récusive les lignes commencant par l'expression "import" dans le dosser "/foo" | |
grep -r --color -n -i "^import" /foo |
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
{ | |
"name": "moule2", | |
"version": "1.0.0", | |
"description": "moule asp", | |
"dependencies": { | |
"autoprefixer": "^10.2.5", | |
"node-sass": "^5.0.0", | |
"npm-run-all": "^4.1.5", | |
"postcss": "^8.2.8", | |
"postcss-cli": "^8.3.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
$vals: 768px, 992px, 1200px; | |
$breaks: sm, md, xl; | |
$base-space: 0.25rem; | |
@for $i from 0 through 4 { | |
.p-#{$i} { | |
padding: ($i * $base-space); | |
} |
NewerOlder