Skip to content

Instantly share code, notes, and snippets.

View kendoodoo's full-sized avatar
😇
got till it's gone

cheese kendoodoo

😇
got till it's gone
View GitHub Profile
@menushka
menushka / airdropSorter.scpt
Created December 30, 2018 22:47
A Folder Action script written in AppleScript used to separate AirDropped files into a different folder other than the default Downloads folder
property AIRDROP_FOLDER : "Path:to:AirDrop:Folder:in:Alias:format"
property QUARANTINE_KEY : "59"
property GET_QUARANTINE_COMMAND_START : "ls -l -@ '"
property GET_QUARANTINE_COMMAND_END : "' | tr '\\n' ' ' | sed 's/.*com\\.apple\\.quarantine\\s*\\(\\d*\\)/ \\1/' | awk '{$1=$1};1'"
on adding folder items to this_folder after receiving added_items
repeat with i from 1 to length of added_items
set current_item to item i of added_items
set quarantine_type to getQuarantineType(POSIX path of current_item)
@steven2358
steven2358 / ffmpeg.md
Last active October 27, 2025 18:19
FFmpeg cheat sheet
@richard512
richard512 / how-youtube-works.md
Last active December 23, 2022 17:42
How Youtube HTML5 Audio+Video Streaming Works - by Nick Vogt

How YouTube Streams Video & Audio

Posted Nov 20, 2014 by Nick Vogt

This is a technical post on how the YouTube player works, including the kinds of http requests it makes and how it streams video and audio. This information was researched with the HTML5 player, but may be applicable to the Flash player as well. The HTML5 player uses JavaScript and is the default player for Chrome and newer Internet Explorer.

Get YouTube Video Info

When the YouTube video player is started, either on a youtube.com page or an embed, it first sends a request to http://www.youtube.com/get_video_info with about 13 query string parameters. These parameters contain information such as the video ID, the player width/height, and what host is requesting the video. 

<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
@dps
dps / gist:4189760
Created December 2, 2012 16:52
Python code to convert seconds since epoch to ISO format (for kml, xml datetime etc)
dt = datetime.datetime.utcfromtimestamp(seconds_since_epoch)
iso_format = dt.isoformat() + 'Z'
@gcmurphy
gcmurphy / autosave.js
Created September 6, 2012 05:43
Very simple autosave functionality using local storage
var AutoSave = (function(){
var timer = null;
function getEditor(){
var elems = document.getElementsByTagName("textarea")
if (elems.length <= 0)
return null;