Download Youtube Videos using Ruby or PHP
Just copy the appropriate script, provide the video_id
and run. It will list download links for different qualities and streams.
:P
#!/bin/bash | |
MONGO_DATABASE="your_db_name" | |
APP_NAME="your_app_name" | |
MONGO_HOST="127.0.0.1" | |
MONGO_PORT="27017" | |
TIMESTAMP=`date +%F-%H%M` | |
MONGODUMP_PATH="/usr/bin/mongodump" | |
BACKUPS_DIR="/home/username/backups/$APP_NAME" |
/** | |
* Axios Request Wrapper | |
* --------------------- | |
* | |
* @author Sheharyar Naseer (@sheharyarn) | |
* @license MIT | |
* | |
*/ | |
import axios from 'axios' |
# Dev Local Conf for multiple subdomain websites | |
# Here `appdev.com` is pointing to 127.0.0.1 | |
#resolver 127.0.0.11 valid=5s; # for docker | |
ssl_certificate /usr/local/etc/nginx/ssl/app.server.crt; | |
ssl_certificate_key /usr/local/etc/nginx/ssl/app.server.key; | |
upstream app_backend { server localhost:4000; } | |
upstream app_website { server localhost:5001; } |
# Enter this command to create a sudoers override/include file: | |
# sudo visudo -f /etc/sudoers.d/nginx.overrides | |
# (Make sure you actually have this in your /etc/sudoers - Run `sudo visudo` to check) | |
# #includedir /etc/sudoers.d | |
# This file assumes your deployment user is `deploy` | |
# Nginx Commands | |
Cmnd_Alias NGINX_RESTART = /usr/sbin/service nginx restart |
#!/usr/bin/env bash | |
# Bash3 Boilerplate. Copyright (c) 2014, kvz.io | |
set -o errexit | |
set -o pipefail | |
set -o nounset | |
# set -o xtrace | |
# Set magic variables for current file & dir | |
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" |
import zmq | |
from pymouse import PyMouse | |
#mouse setup | |
m = PyMouse() | |
x_dim, y_dim = m.screen_size() | |
#network setup | |
context = zmq.Context() | |
socket = context.socket(zmq.SUB) |
Mix.install([{:plug_cowboy, "~> 2.0"}]) | |
defmodule Server do | |
use Plug.Router | |
plug(:match) | |
plug(:dispatch) | |
match _ do | |
send_resp(conn, 200, "Hello World!") | |
end |
class APIController < ApplicationController | |
include JSONErrors | |
# ... | |
end |
defmodule Episode do | |
defstruct id: nil, name: nil, video: nil, markdown: nil, post: nil | |
def list do | |
[ | |
%Episode{id: "001", post: "271", name: "Introduction and Installing Elixir", video: "1366", markdown: "1382" }, | |
%Episode{id: "002", post: "275", name: "Basic Elixir", video: "1367", markdown: "1357" }, | |
%Episode{id: "003", post: "280", name: "Pattern Matching", video: "14879", markdown: "1413" }, | |
%Episode{id: "004", post: "284", name: "Functions", video: "5086", markdown: "1559" }, | |
%Episode{id: "005", post: "298", name: "Mix and Modules", video: "5087", markdown: "1654" }, |