Skip to content

Instantly share code, notes, and snippets.

View thusitha92's full-sized avatar
🎯
Focusing

Thusitha Manathunga thusitha92

🎯
Focusing
View GitHub Profile
@thusitha92
thusitha92 / youtube-playlist-creator.js
Last active May 23, 2019 04:42
YouTube Playlist Creator
//Do you need to repeat part of a Youtube song?
//This script will help you to do that. Modify it for your own needs.
//***********************************
//Please provide a song list with start and end times.
//Multiple songs are allowed.
//Time should be in HH:MM:SS format
//Example song url: https://www.youtube.com/watch?v=tly6mJ5O8kg
let songs = [{"start": "00:16:49", "end": "00:20:24"}];
@thusitha92
thusitha92 / deploy.bat
Created October 4, 2018 05:27
A bat file to automate the Zeit Now deployments in Windows
call now rm <YOUR_APP_NAME>
call now --public
call now alias
call now scale <YOUR_APP_URL> sfo1 1
$ git remote rm origin
$ git remote add origin [email protected]:aplikacjainfo/proj1.git
$ git config master.remote origin
$ git config master.merge refs/heads/master
@thusitha92
thusitha92 / time-parser-es6.js
Last active September 22, 2018 17:16
This is an ES6 time parsing function to convert any time string into 24 format and otherwise returns an error
const parseTime = (time) => {
const error = "INVALID TIME";
//validate minutes
const validateMins = (mins) => {
try {
mins = parseInt(mins);
if (mins >= 0 && mins <= 60) {
mins = mins.toString();