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
| # 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 |
| <?xml version="1.0" encoding="utf-8"?><!-- | |
| ~ Copyright (C) 2015 The Android Open Source Project | |
| ~ | |
| ~ Licensed under the Apache License, Version 2.0 (the "License"); | |
| ~ you may not use this file except in compliance with the License. | |
| ~ You may obtain a copy of the License at | |
| ~ | |
| ~ http://www.apache.org/licenses/LICENSE-2.0 | |
| ~ | |
| ~ Unless required by applicable law or agreed to in writing, software |
| #!/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> |
| 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; |
I use these snippets to implement Google Now Card appear-animations on Android. Add these two files to your res/anim/ folder and add a swing_anim_time integer to your values:
<!-- res/values/strings.xml -->
<integer name="swing_anim_time">750</integer>| // The Very Basic | |
| new AsyncTask<Void, Void, Void>() { | |
| protected void onPreExecute() { | |
| // Pre Code | |
| } | |
| protected Void doInBackground(Void... unused) { | |
| // Background Code | |
| return null; | |
| } | |
| protected void onPostExecute(Void unused) { |
| /* | |
| * Copyright 2014 Chris Banes | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| @binkmail.com | |
| @bobmail.info | |
| @chammy.info | |
| @devnullmail.com | |
| @letthemeatspam.com | |
| @mailinater.com | |
| @mailinator.net | |
| @mailinator2.com | |
| @notmailinator.com | |
| @reallymymail.com |
| # Clear existing task so we can replace it rather than "add" to it. | |
| Rake::Task["deploy:compile_assets"].clear | |
| namespace :deploy do | |
| desc 'Compile assets' | |
| task :compile_assets => [:set_rails_env] do | |
| # invoke 'deploy:assets:precompile' | |
| invoke 'deploy:assets:precompile_local' | |
| invoke 'deploy:assets:backup_manifest' |