https://github.com/rg3/youtube-dl/
apt-get install libav-tools ffmpeg # Linux (either one of either should do) brew install ffmpeg # OSX choco install ffmpeg # Windows
| Remove ._*- and .AppleDouble-files from folders. | |
| Adapted from Torkel's comment on http://hints.macworld.com/article.php?story=20021118060850652 | |
| Cred to hiber for suggesting adding -print0/-0 to solve whitespace issue. | |
| See all ._*-files: | |
| find . -name '._*' | more | |
| Remove all ._*-files: | |
| find . -name '._*' -print0 | xargs -0 rm |
| javascript:(function(){var p=document.createElement("p");p.innerHTML="<strong>Loading…</strong>";p.id="loadingp";p.style.padding="20px";p.style.background="#fff";p.style.left="20px";p.style.top=0;p.style.position="fixed";p.style.zIndex="9999999";p.style.opacity=".85";document.body.appendChild(p);document.body.appendChild(document.createElement("script")).src="https://cdn.rawgit.com/ttscoff/6109434/raw/Bullseye.js?x="+(Math.random());})(); |
| Create a new bookmark and set it's URL to this: | |
| javascript:(function(xs)%7Bfor(var%20i%3D0%3Bi%3Cxs.length%3B%2B%2Bi)%7Bif(xs%5Bi%5D.currentSrc)%7Breturn%20window.open(xs%5Bi%5D.currentSrc)%3B%7D%7D%7D)(document.querySelectorAll('audio%2Cvideo'))%3B | |
| When media is playing using HTML5 audio/video you can click this bookmark to open a new tab/window with the media. Then to download it use the context menu action "Save As..." (right mouse button -> Save As...). | |
| If you use Chrome/Safari/recent Opera (WebKit/Blink) you can do better(!) and immediately download the file using this bookmarklet instead: | |
| javascript:(function(xs)%7Bfor(var%20i%3D0%3Bi%3Cxs.length%3B%2B%2Bi)%7Bif(xs%5Bi%5D.currentSrc)%7Bvar%20a%3Ddocument.createElement('a')%3Ba.target%3D'_blank'%3Ba.download%3D''%3Ba.href%3Dxs%5Bi%5D.currentSrc%3Ba.click()%3Breturn%3B%7D%7D%7D)(document.querySelectorAll('audio%2Cvideo'))%3B |
| // Marker, a bookmarklet for Markdownifying webpage selections | |
| // javascript:(function(){var p=document.createElement("p");p.innerHTML="<strong>Loading…</strong>";p.id="loadingp";p.style.padding="20px";p.style.background="#fff";p.style.left="20px";p.style.top=0;p.style.position="fixed";p.style.zIndex="9999999";p.style.opacity=".85";document.body.appendChild(p);document.body.appendChild(document.createElement("script")).src="https://gist.github.com/ttscoff/8078727/raw/Marker.js?x="+(Math.random());})(); | |
| (function () { | |
| function callback() { | |
| (function ($) { | |
| var raw, userSelection; | |
| if (window.getSelection) { | |
| // W3C Ranges | |
| userSelection = window.getSelection (); | |
| // Get the range: |
| #!/usr/bin/env perl | |
| # | |
| # http://daringfireball.net/2007/03/javascript_bookmarklet_builder | |
| use strict; | |
| use warnings; | |
| use URI::Escape qw(uri_escape_utf8); | |
| use open IO => ":utf8", # UTF8 by default | |
| ":std"; # Apply to STDIN/STDOUT/STDERR |
| # clear dns cache | |
| alias cleardns='sudo dscacheutil -flushcache' |
| #!/bin/bash | |
| # Locate files relative to current working directory | |
| # Potentially faster than find for deep directories | |
| function rlocate | |
| { | |
| locate "$1" | grep "$(pwd)" | |
| } |
https://github.com/rg3/youtube-dl/
apt-get install libav-tools ffmpeg # Linux (either one of either should do) brew install ffmpeg # OSX choco install ffmpeg # Windows
| # Convert gif to video. The best/right way to serve GIF in today's date. | |
| ffmpeg -f gif -i input.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -preset veryslow output.mp4 | |
| # Create a video from slideshow with framerate 1 frame per 2 seconds. | |
| ffmpeg -framerate 1/2 -i %d_1x1.jpeg -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" output.mp4 | |
| # Encode with same video but different audio | |
| ffmpeg -i input.mp4 -vcodec copy -acodec {mp2,mp3,aac,ac3} output-vcodec_h264-acodec_mp2.mp4 | |
| # Encode with video as h264 and audio as aac with crf |