Skip to content

Instantly share code, notes, and snippets.

@underscorebrody
underscorebrody / find_unused_images.rake
Created April 24, 2019 20:15 — forked from rafaelp/find_unused_images.rake
Rake task to find unused images on Rails project to deletion.
# It requires ACK - http://betterthangrep.com/
task :find_unused_images do
images = Dir.glob('app/sources/images/**/*')
images_to_delete = []
filelist = `cd .. && ack -g -i '(my-app/app|my-app/public|my-gem/app)'`
images.each do |image|
unless File.directory?(image)
# print "\nChecking #{image}..."
print "."
@underscorebrody
underscorebrody / litra-auto-on.plist
Last active January 18, 2023 20:32 — forked from antonmry/litra-auto-on.plist
This is script to auto on/off a Logitech light when the webcam is on/off in Mac. It requires hidapitester. Modified to support multiple lights.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>litra-auto-on</string>
<key>ProgramArguments</key>
<array><string>/Library/LaunchDaemons/litra-auto-on.sh</string></array>
<key>RunAtLoad</key>
<true/>