Skip to content

Instantly share code, notes, and snippets.

View romach's full-sized avatar

Roman Cherepanov romach

View GitHub Profile
@romach
romach / remove-file.sh
Created April 9, 2017 08:59
Remove file
rm file.txt
@romach
romach / remove-directory.sh
Created April 9, 2017 09:00
Remove directory
rm -r directory
@romach
romach / get-information-of-all-droplets.sh
Created April 9, 2017 16:07
Get information of all droplets
curl -X GET -H "Authorization: Bearer $TOKEN" "https://api.digitalocean.com/v2/droplets"
@romach
romach / multithreading.md
Last active April 9, 2017 19:25
Multithreading

Task is an instance of the Runnable interface.

Thread is an object that facilitates the execution of a task, implements Runnable.

@romach
romach / show-file-content.sh
Created April 9, 2017 20:28
Show file content
# show full file
cat file.txt
# Show first 10 lines
head file.txt
# show last 10 lines
tail file.txt
# show file inprogress
@romach
romach / find-lines-in-file.sh
Created April 9, 2017 20:30
Find lines in file
grep 'Text to find' file.txt
@romach
romach / open-file-by-page.sh
Last active April 9, 2017 20:46
Open file by page
# open file by page
# h - help
# g - begin
# G - end
# f - page down
# b - page up
# /pattern - search
# n - next occurence
# N - previous occurence
less file.txt