Skip to content

Instantly share code, notes, and snippets.

@jonobr1
jonobr1 / auto-capture.scpt
Last active September 6, 2024 19:20
A small AppleScript to take a screenshot every 30 seconds for 8 hours. Saves to an Image Sequence in a desktop folder. Great for recording your workday.
set dFolder to "~/Desktop/screencapture/"
do shell script ("mkdir -p " & dFolder)
set i to 0
repeat 960 times
do shell script ("screencapture " & dFolder & "frame-" & i & ".png")
delay 30 -- Wait for 30 seconds.
set i to i + 1
end repeat
@danfinlay
danfinlay / gist:cbfe5a7693cd811d1199
Created January 28, 2015 04:31
Editing DOM with Javascript

Editing DOM With Javascript

A friend recently asked me for some help with jQuery. He wanted to know how to store data on html elements from the JSON payload he was receiving. His initial approaches were much like some of my own early approaches, storing data on elements using data attributes, and then updating those accordingly.

I've since come to learn that these are considered bad practices, and for good enough reasons. Sure, it can work, but it will be slow, and difficult to implement, and if your UI gets very complicated, you'll find yourself juggling multiple sources of truth in your application.

There are several approaches available to the modern web app developer, and I'm sorry I don't believe I'm a grand enough authority to choose a specific one for a project that isn't mine, but I am aware of enough different approaches I think I can get you oriented with what to look for in a good solution.

A Single Source of Truth

@kylemcdonald
kylemcdonald / BrowseCapture.scpt
Created June 25, 2014 23:40
Records video from your webcam whenever you are visiting a specific site.
global targetDomain
global folderName
-- options
set targetDomain to "dropcam.com"
set folderName to (path to desktop as text) & "Dropcam"
-- main code
global recordingFile
global newMovieRecording
@nicoleslaw
nicoleslaw / 1_Tiny_Content_Framework.md
Last active January 24, 2025 16:39
Tiny Content Framework

Tiny Content Framework

About the project

This is a tiny content strategy framework focused on goals, messages, and branding. This is not a checklist. Use what you need and scrap the rest. Rewrite it or add to it. These topics should help you get to the bottom of things with clients and other people you work with.

Give me feedback on Twitter (@nicoleslaw) or by email ([email protected]).

Contents