Skip to content

Instantly share code, notes, and snippets.

View vitaliisili's full-sized avatar
😉

Vitalii Sili vitaliisili

😉
View GitHub Profile
@vitaliisili
vitaliisili / .gitignore
Created August 24, 2023 07:42
python_general
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# AWS User-specific
.idea/**/aws.xml
# Add git branch in bash
function parse_git_branch () {
# The line below is changed.
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\ \(\1)/'
}
RED="\[\033[01;31m\]"
YELLOW="\[\033[01;33m\]"
GREEN="\[\033[01;32m\]"
@vitaliisili
vitaliisili / decodeStringToMorse.js
Created February 21, 2019 00:03
decode string to Morse
decodeStringToMorse = function(morseCode){
const morseAlphabet = {
"-----":"0",
".----":"1",
"..---":"2",
"...--":"3",
"....-":"4",
".....":"5",
"-....":"6",
"--...":"7",
@vitaliisili
vitaliisili / timer.js
Created November 20, 2018 19:14
Timer
function countdown(endDate) {
let days, hours, minutes, seconds;
endDate = new Date(endDate).getTime();
if (isNaN(endDate)) {
return;
}
setInterval(calculate, 1000);