Skip to content

Instantly share code, notes, and snippets.

Avatar

Nathaniel Landau natelandau

View GitHub Profile
@ttscoff
ttscoff / a_lazy_youtube_tag.rb
Last active Jan 26, 2020
My current setup for embedding YouTube videos in Jekyll. Responsive layout, poster image first/click to load for faster page loads.Provides a `{% youtube VIDEOID 800 600 "optional caption" %}` tag that generates the markup needed for the CSS and jQuery script.
View a_lazy_youtube_tag.rb
# Title: Responsive Lazy Load YouTube embed tag for Jekyll
# Author: Brett Terpstra <http://brettterpstra.com>
# Description: Output a styled element for onClick replacement with responsive layout
#
# Syntax {% youtube video_id [width height] ["Caption"] %}
#
# Example:
# {% youtube B4g4zTF5lDo 480 360 %}
# {% youtube http://youtu.be/2NI27q3xNyI %}
@brettkelly
brettkelly / nvAltNoteFromSelection.applescript
Created Apr 18, 2013
AppleScript to create a new nvAlt note from the selected text in any app.
View nvAltNoteFromSelection.applescript
-- copy selected text
tell application "System Events"
keystroke "c" using command down
end tell
-- switch to nvAlt
tell application "nvALT"
activate
tell application "System Events"
keystroke "l" using command down -- Create or Search
@ttscoff
ttscoff / Dropzone Image Filer.dropzone.rb
Last active Mar 22, 2020
Dropzone Destination for filing images to a Jekyll uploads folder and returning Markdown links to relative paths
View Dropzone Image Filer.dropzone.rb
#!/usr/bin/ruby
# Dropzone Destination Info
# Name: Jekyll Image Filer
# Description: Files images in a Jekyll repo
# Handles: NSFilenamesPboardType
# Creator: Brett Terpstra
# URL: http://brettterpstra.com
# IconURL: http://brettterpstra.com/destinations/icons/jekyllfiler.png
# OptionsNIB: ChooseFolder
You can’t perform that action at this time.