Skip to content

Instantly share code, notes, and snippets.

@jordwalke
jordwalke / watch.sh
Last active September 19, 2018 22:30
Watcher Script Using Unix Find.
#!/bin/bash
# Invoke like this:
# ./watch.sh my command here
# And it will run 'my command here' once, and then when it detects changes.
# TODO: Don't just search in the last second. Search for updates since the last
# completed build. Otherwise for big directories, midway through your search
# you've already taken 1s and you will miss updates.
@marocchino
marocchino / gist:7884710
Created December 10, 2013 02:07
translate to korean apple script
-- ref --
-- http://superuser.com/questions/296421/google-translate-client-for-os-x
-- https://gist.github.com/mayoff/1138816
on run argv
tell application "Google Chrome"
activate
set theUrl to "http://translate.google.com/#en|ko|" & item 1 of argv
if (count every window) = 0 then
@addyosmani
addyosmani / limitLoop.js
Last active January 23, 2025 15:41
Limit the frame-rate being targeted with requestAnimationFrame
/*
limitLoop.js - limit the frame-rate when using requestAnimation frame
Released under an MIT license.
When to use it?
----------------
A consistent frame-rate can be better than a janky experience only
occasionally hitting 60fps. Use this trick to target a specific frame-
rate (e.g 30fps, 48fps) until browsers better tackle this problem