Skip to content

Instantly share code, notes, and snippets.

View var-bin's full-sized avatar
🤙
Preprocessors do not output bad code. Bad developers do.

Vitalii Rybka var-bin

🤙
Preprocessors do not output bad code. Bad developers do.
View GitHub Profile
@var-bin
var-bin / mc
Last active March 9, 2017 19:40
Run GNU Midnight Commander. Repository https://github.com/var-bin/terminalForCoder__WSD
mc
npm i
node index.js
@var-bin
var-bin / listening on localhost:3000
Last active March 9, 2017 19:40
screen|tmux listening on localhost:3000. Repository https://github.com/var-bin/terminalForCoder__WSD
listening on localhost:3000
#!/bin/bash
echo "Hello, world!"
# ./hw.sh - how this script should be called
@var-bin
var-bin / variables.sh
Last active March 9, 2017 19:39
Working with variables in bash. Repository https://github.com/var-bin/terminalForCoder__WSD
#!/bin/bash
var1="$1"
var2="$2"
echo "Arguments are ${var1} and ${var2}"
# ./variables.sh Hello world - how this script should be called
if [[ condition ]]
then
# an action, if condition is true
fi
-z <string> # string is empty
-n <string> # string is not empty
<str1> == <str2> # strings are equal
<str1> != <str2> # strings are not equal
<numbers/strings> operation <numbers/strings>
-eq, (==) # equal
-ne, (!=) # not equal
-lt, (<) # less than
-le # less than or equal
-gt, (>) # more than
-ge # more than or equal