Skip to content

Instantly share code, notes, and snippets.

View davistran86's full-sized avatar

davistran86

View GitHub Profile
@davistran86
davistran86 / youtube-dl-download-pluralsight.md
Created June 19, 2018 03:59 — forked from munim/youtube-dl-download-pluralsight.md
youtube-dl to download pluralsight videos

Download Plural Sight videos

Software required:

youtube-dl

After installation and putting the youtube-dl in PATH

youtube-dl \
### variables
variable "env" {}
variable "riak_count" {}
variable "elastic_count" {}
### hostname.tpl
${name}-${env}-${format("%02s",index)} ${extra}
### ansible.tpl
@davistran86
davistran86 / inventory.tf
Created July 12, 2018 14:28 — forked from hectorcanto/inventory.tf
Produce an Ansible inventory from a Terraform template
data "template_file" "inventory" {
template = "${file("inventory.tpl")}"
vars {
backend_ip = "${aws_instance.backend.public_ip}"
frontend_ip = "${aws_instance.frontend.public_ip}"
landing_ip = "${aws_instance.landing.public_ip}"
key_path = "${var.instance_key_path}"
}
}
# from https://docs.openshift.com/container-platform/3.9/install_config/install/advanced_install.html#running-the-advanced-installation-system-container
[OSEv3:children]
lb
masters
etcd
nodes
[lb]
prod-lb-01.example.com
@davistran86
davistran86 / media-query.css
Created May 23, 2019 17:12 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@davistran86
davistran86 / index.html
Created September 18, 2019 07:47 — forked from mandulaj/index.html
Webssh
<!doctype html>
<html>
<head>
<title>SSH Client</title>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/socket.io/1.3.5/socket.io.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<style>
body {
margin: 0;
padding: 0;
@davistran86
davistran86 / appointment.ts
Created December 17, 2019 04:38 — forked from gautamsi/appointment.ts
Fetch Appointments using ews-javascript-api
import { ExchangeService, ExchangeVersion, WebCredentials, Uri, DateTime, CalendarView, WellKnownFolderName, EwsLogging } from "ews-javascript-api";
import credentials = require("./credentials"); //for username and password
EwsLogging.DebugLogEnabled = false;
var service = new ExchangeService(ExchangeVersion.Exchange2010);
service.Credentials = new WebCredentials(credentials.userName, credentials.password);
service.Url = new Uri("https://outlook.office365.com/Ews/Exchange.asmx");
var view = new CalendarView(DateTime.Now.Add(-1, "week"), DateTime.Now); // appointments in last one week.
@davistran86
davistran86 / LDAPjs New User
Created December 28, 2019 09:37 — forked from pvencill/LDAPjs New User
Creating a new user in LDAPjs; complete example.
var ldap = require('ldapjs');
var ssha = require('node-ssha256');
var BASE = 'ou=Users,dc=example,dc=org';
// default port for ldaps
var URL = 'ldaps://ldap.example.org/:636';
// user and pass are for existing user with rights to add a user

Download Udemy course videos using youtube-dl

$ youtube-dl --list-extractors | grep udemy

Steps

  1. Get link to the course to download. e.g. https://www.udemy.com/course-name/
  2. Login into udemy website, save the cookie from Firefox (cookies.txt)[1] export extension. Save it to file cookies.txt

$ youtube-dl https://www.udemy.com/course-name/ --cookies ./cookies.txt > $ youtube-dl -u username -p password -o './videos/%(playlist)s/%(chapter_number)s - %(chapter)s/%(title)s.%(ext)s' https://www.udemy.com/course-name --cookies ./cookies.txt --verbose

@davistran86
davistran86 / reactjs-learning-path-2020.md
Created June 28, 2020 16:49 — forked from paulnguyen-mn/reactjs-learning-path-2020.md
Lộ trình học ReactJS cơ bản cho người mới bắt đầu 2020 🚀

Lộ trình học ReactJS cơ bản cho người mới bắt đầu 2020 🎉

  • Đôi tượng: mới bắt đầu học ReactJS mà không biết học những gì.
  • Yêu cầu kiến thức: