Skip to content

Instantly share code, notes, and snippets.

View romach's full-sized avatar

Roman Cherepanov romach

View GitHub Profile
@romach
romach / use-help.sh
Created April 9, 2017 20:43
Use help
man command
@romach
romach / show-full-path-to-command.sh
Created April 9, 2017 20:48
Show full path to command
which command
@romach
romach / environment-variables.sh
Created April 9, 2017 20:58
Environment variables
# $PATH - programs paths
# create
NUMBER=1
# delete
unset NUMBER
# print
echo $NUMBER
# show all env vars in session
env
@romach
romach / analyse-memory-usage.md
Created April 9, 2017 22:25
Analyse memory usage
@romach
romach / convert-long-to-integer.java
Created April 10, 2017 11:13
Convert Long to Integer
Integer i = theLong != null ? theLong.intValue() : null;
@romach
romach / compare-date.java
Created April 10, 2017 12:19
Java compare date
testDate.after(startDate) && testDate.before(endDate);
@romach
romach / show-diff.sh
Created April 10, 2017 12:56
Show diffs in modified file
git diff test.txt
@romach
romach / create-variable.py
Last active April 10, 2017 21:42
Create variable
# int
age = 30
# float
price = 1.25
# boolean
alive = True
dead = False