Skip to content

Instantly share code, notes, and snippets.

@space-pope
space-pope / application.hbs
Created June 2, 2014 01:27
Code samples for 2014-06-01 post - Ember, Vagrant, and Windows: http://space-pope.github.io/ember/2014/06/01/ember-for-beginners/
<div class="header">
<!--header/nav/etc goes here-->
</div>
<div class="container">
{{outlet}}
</div>
<div class="footer">
<!--footer goes here-->
rsync -a --progress --exclude dist --exclude tmp /www/ /build-temp/<app-name>/
cd /build-temp/<app-name>
sudo -u vagrant bower install
ember build
rsync -a --progress --exclude node_modules . /www/
var master = app.project.item(1), // master comp has to be the top comp in the project bin
template = app.project.item(2); // and the comp you're looking to make different versions of should be right below it
// the only layers expected in the master comp are different versions of the text layer you're trying to change
for (var i = 1; i <= master.numLayers; i++) {
var textVersion = master.layer(i),
name = textVersion.property("Source Text").value,
copy = template.duplicate();
copy.name = name;
// the layer you're changing is expected to be the top layer in the template LT

Keybase proof

I hereby claim:

  • I am space-pope on github.
  • I am jziegler (https://keybase.io/jziegler) on keybase.
  • I have a public key ASAlg_rNPZNS7l3DVfD8_UBVy5V1Aum6PsTtJzri-CzazQo

To claim this, I am signing this object:

@space-pope
space-pope / yt-dlp_partial_download.py
Last active March 8, 2024 18:55
Using yt-dlp to download a portion of a video in Python
"""
It took me far longer than necessary to figure out how to use yt-dlp to trim/download a subset of a longer video
outside the context of a command line (i.e., directly in Python), so I'm recording it here for posterity.
There's no shortage of command-line examples of using `--ppa "ffmpeg_i:[...]`, but the documentation doesn't
exactly make it clear how to translate this to the Python version of the options, so here goes. A couple
additional quirks come into play too; we'll get to those soon enough.
"""
import yt_dlp