add first Crystal snipplet

This commit is contained in:
Alexander Popov 2022-04-08 17:34:07 +03:00
parent 412eaf212e
commit ea6d3e58a5
Signed by: iiiypuk
GPG Key ID: 3F76816AEE08F908
3 changed files with 13 additions and 0 deletions

View File

@ -1,6 +1,7 @@
* [HTML](~/HTML/) * [HTML](~/HTML/)
* [CSS](~/CSS/) * [CSS](~/CSS/)
* [HTTP](~/HTTP/) * [HTTP](~/HTTP/)
* [Crystal](~/Crystal/)
* [PHP](~/PHP/) * [PHP](~/PHP/)
* [JavaScript](~/JavaScript/) * [JavaScript](~/JavaScript/)
* [nginx](~/nginx/) * [nginx](~/nginx/)

4
~/Crystal/README.md Normal file
View File

@ -0,0 +1,4 @@
# Crystal
## std
- [Значение из Regex::MatchData](value_from_match.cr) - Получить значение из `Regex::MatchData("Happy")`

View File

@ -0,0 +1,8 @@
test_string_1 = "rw------- (0o600)"
# test_string_2 = "rwx------ (0o700)"
if /\d{3}/.match(test_string_1).try &.[0] != "600"
puts "Password file permissions is not RW for you.".colorize(:red)
exit(0)
end