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
| public class SimpleJSON { | |
| /** | |
| * @author: Sheharyar Naseer (@sheharyarn) | |
| * @license: MIT | |
| */ | |
| public static Object toJSON(Object object) throws JSONException { | |
| if (object instanceof HashMap) { | |
| JSONObject json = new JSONObject(); | |
| HashMap map = (HashMap) object; |
| #!/bin/env ruby | |
| #### This Ruby Script extracts Captions as .srt files from | |
| #### MediaStorm Videos (http://mediastorm.com) | |
| #### Download The Video, and if you want to download captions, | |
| #### lookup the 'Network' tab in Inspector to see the video id | |
| #### It'll be a GET request to two xml documents on the mediastorm | |
| #### server, namely; /timecodes/<id> and /phrases/<id> |
The magic eval() function in jsfuck:
[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+
[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][
[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[
]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]| # 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 |
| # Put this in your rails_app/lib/capistrano/tasks/paperclip.rake | |
| namespace :paperclip do | |
| namespace :refresh do | |
| desc "Refresh All Paperclip Styles (Must Specify 'CLASS' parameter)" | |
| task :all do | |
| if ENV['CLASS'] | |
| on roles(:app) do | |
| within release_path do |
| # Add this file to "rails_app/lib/capistrano/tasks/nginx.rake" | |
| # This will create these tasks: | |
| # - cap stage nginx:start | |
| # - cap stage nginx:stop | |
| # - cap stage nginx:restart | |
| # - cap stage nginx:reload | |
| # Because of "sudo", you'll have to put nginx commands in your visudo file | |
| # See this: https://gist.github.com/sheharyarn/f3d98e8cc859f092532b |
| 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" }, |
| // Super Simple wrapper for Sass Media Queries | |
| // Provides only two mixins: | |
| // - small-screens | |
| // - medium-screens | |
| // https://gist.github.com/sheharyarn/c781dd642d387b947020 | |
| // Copyright (c) 2015 Sheharyar Naseer - MIT License | |
| @import "sass-media-queries"; |