Skip to content

Instantly share code, notes, and snippets.

youtube-dl "https://www.youtube.com/watch?v=OyPvI_NxZU8&list=PLdawRnR9ilZBWJsnzHhkzFywWmwhvqlWD" -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" --sub-lang en --write-sub
@goldnetonline
goldnetonline / maintenance.html
Last active November 26, 2019 17:33 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
youtube-dl https://www.udemy.com/courseName/ --cookies cookies.txt -o '%(playlist)s/%(chapter_number)s - %(chapter)s/%(playlist_index)s. %(title)s.%(ext)s' --sub-lang en --write-sub --sleep-interval 15 --max-sleep-interval 60
@goldnetonline
goldnetonline / download-udemy-with-cookie
Last active August 5, 2018 21:23
Download Udemy Courses with Cookie
@goldnetonline
goldnetonline / nigeria-states.json
Last active February 5, 2017 23:43
Lagos States and their Local Governments in proper structured JSON
{"Abia":{"id":3883,"locals":["Aba South","Arochukwu","Bende","Ikwuano","Isiala Ngwa North","Isiala Ngwa South","Isuikwuato","Obi Ngwa","Ohafia","Osisioma","Ugwunagbo","Ukwa East","Ukwa West","Umuahia North","Umuahia South","Umu Nneochi"]},"Adamawa":{"id":3884,"locals":["Fufure","Ganye","Gayuk","Gombi","Grie","Hong","Jada","Lamurde","Madagali","Maiha","Mayo Belwa","Michika","Mubi North","Mubi South","Numan","Shelleng","Song","Toungo","Yola North","Yola South"]},"Akwa Ibom":{"id":3885,"locals":["Eastern Obolo","Eket","Esit Eket","Essien Udim","Etim Ekpo","Etinan","Ibeno","Ibesikpo Asutan","Ibiono-Ibom","Ika","Ikono","Ikot Abasi","Ikot Ekpene","Ini","Itu","Mbo","Mkpat-Enin","Nsit-Atai","Nsit-Ibom","Nsit-Ubium","Obot Akara","Okobo","Onna","Oron","Oruk Anam","Udung-Uko","Ukanafun","Uruan","Urue-Offong/Oruko","Uyo"]},"Anambra":{"id":3886,"locals":["Anambra East","Anambra West","Anaocha","Awka North","Awka South","Ayamelum","Dunukofia","Ekwusigo","Idemili North","Idemili South","Ihiala","Njikoka","Nnewi North","Nnew
@goldnetonline
goldnetonline / addThousandSeparator
Created December 7, 2016 14:46
Add Thousand Separator
function _addThousandSep(n){
var rx= /(\d+)(\d{3})/;
return String(n).replace(/^\d+/, function(w){
while(rx.test(w)){
w= w.replace(rx, '$1'+thousandSeparator+'$2');
}
return w;
});
@goldnetonline
goldnetonline / node-server.js
Created September 2, 2016 17:51
node.js quick server with express
var express = require('express');
var server = express();
server.use(express.static(__dirname + '/'));
var port = 80;
server.listen(port, function() {
console.log('server listening on port ' + port);
});
@goldnetonline
goldnetonline / stripstag.js
Created September 2, 2016 17:45
Javascript Strips Tag
function stripTag(html) {
var tmp = dc.createElement("div");
tmp.innerHTML = html;
return tmp.textContent || tmp.innerText || "";
}
@goldnetonline
goldnetonline / string-format.js
Created September 2, 2016 17:45
Javascript String Format
if (!String.prototype.format) {
String.prototype.format = function() {
var args = arguments;
return this.replace(/{(\d+)}/g, function(match, number) {
return typeof args[number] != 'undefined' ? args[number] : match;
});
};
}
@goldnetonline
goldnetonline / array-shuffle.js
Created September 2, 2016 17:43
Javascript Array Shuffle
Array.prototype.shuffle = function() {
var input = this;
for (var i = input.length-1; i >=0; i--) {
var randomIndex = Math.floor(Math.random()*(i+1));
var itemAtIndex = input[randomIndex];
input[randomIndex] = input[i];
input[i] = itemAtIndex;