This file contains hidden or 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
=============================================================================== | |
= B i e n v e n u e dans l e T u t o r i e l de V I M - Version 1.7 = | |
=============================================================================== | |
Vim est un éditeur très puissant qui a trop de commandes pour pouvoir | |
toutes les expliquer dans un cours comme celui-ci, qui est conçu pour en | |
décrire suffisamment afin de vous permettre d'utiliser simplement Vim. | |
Le temps requis pour suivre ce cours est d'environ 25 à 30 minutes, selon | |
le temps que vous passerez à expérimenter. |
This file contains hidden or 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/sh | |
val=$(xbacklight -get) | |
increase_light() { | |
# Try to be a bit progressive when in low brightness | |
if [ $val -le 20 ] ; then | |
percent=2 | |
else | |
percent=5 |
This file contains hidden or 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
# rg --files_without_match returns all the files that don't have "strict_types" in them | |
# rg --type php filters only php files | |
# '3 i' insert the following at the third line | |
files=$(rg --type php strict_types --files-without-match) && echo $files | xargs sed -i '3 i declare(strict_types=1);\n' |
This file contains hidden or 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
# I needed a way to print two columns of words based on a list and a number of spaces. | |
# I couldn't find an easy solution, so I made this function. Maybe it can be useful to someone. | |
from typing import List | |
def outputs(words: List[str], spaces: int) -> str: | |
""" | |
Takes a list of words and returns two columns of words separated by spaces. |
This file contains hidden or 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
{ | |
"redirects": [ | |
{ | |
"source": "/(.*)", | |
"has": [ | |
{ | |
"type": "host", | |
"value": "www.mydomain.io" | |
} | |
], |