| Getting out | ||
|---|---|---|
| C-x C-c | Exit emacs | save-buffers-kill-terminal |
| C-g | Cancel running or partially typed command | keyboard-quit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Select an element in the inspector, then paste this into the console. | |
| function textNodesUnder(el){ | |
| var n, a=[], walk=document.createTreeWalker(el,NodeFilter.SHOW_TEXT,null,false); | |
| while(n=walk.nextNode()) a.push(n); | |
| return a; | |
| } | |
| function notAllWhitespace(value) { | |
| return !value.match(/^\s*$/g); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; Anything you type in here will be executed | |
| ;; immediately with the results shown on the | |
| ;; right. | |
| (get {:a 0, :b 1} :c) | |
| (get {:a 0, :b 1} :c "UNICORNS") | |
| (get-in {:a 0 :b {:c "ho hum"}} [:b :c]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (if (> 5 3) "yes, it is" "no, it's not") ;; => "yes, it is" | |
| (if (> 5 5) "yes, it is" "no, it's not") ;; => "no, it's not" | |
| (if true | |
| (do (println "Success!") | |
| "1" | |
| "2" | |
| "3" | |
| "4" |
Conversion script between the TTML & SRT subtitle formats. This is particularly useful with Adobe Premiere, as it doesn't understand the SRT format (which is joyously simple and interoperable). TTML-XML is probably the most straightforward subtitle format it does understand, hence this tool.
Note that due to the simplicity of the SRT format, this conversion is extremely lossy for all the bells and whistles supported by TTML. Not like you'd want fixed-pixel font sizes etc in your subtitles anyway, but you've been warned.