Skip to content

Instantly share code, notes, and snippets.

@salcode
salcode / .gitignore
Last active February 15, 2025 04:55
.gitignore file for a general web project - Bare Minimum Git
# -----------------------------------------------------------------
# .gitignore
# Bare Minimum Git
# https://salferrarello.com/starter-gitignore-file/
# ver 20221125
#
# From the root of your project run
# curl -O https://gist.githubusercontent.com/salcode/10017553/raw/.gitignore
# to download this file
#
@jtwalters
jtwalters / quit-and-relaunch.applescript
Created March 4, 2014 22:21
Quit and relaunch an application in AppleScript, e.g., Google Chrome—to finish installing updates.
set appName to "Google Chrome"
tell application appName to quit
repeat
tell application "System Events"
if appName is not in (name of application processes) then exit repeat
end tell
do shell script "sleep 0.5"
end repeat
tell application appName to launch
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@carlosefonseca
carlosefonseca / Add lines as Reminders
Last active January 3, 2016 21:59
Add selected lines of text as new reminders. Asks for what list. Use as Automator service script. Requires http://applescript.bratis-lover.net/library/string/ to be a Script Library.
on run {input, parameters}
set input to (first item of input)
tell script "_string" to set input to trimBoth(input)
set lst to every paragraph of input
tell application "Reminders"
activate
set aList to (name of lists)
set theList to some list whose name is (first item of (choose from list aList))
@PizzaBrandon
PizzaBrandon / jquery.waituntilexists.js
Last active August 24, 2023 14:23 — forked from buu700/jquery.waituntilexists.js
Updated waitUntilExists plugin
;(function ($, window) {
var intervals = {};
var removeListener = function(selector) {
if (intervals[selector]) {
window.clearInterval(intervals[selector]);
intervals[selector] = null;
}
@benwaldie
benwaldie / 2013-04-21-TUAW_Waldie.applescript
Created April 22, 2013 02:02
TUAW > Extract App Resource Icons with AppleScript
-- Ask the user to select an app
set theApp to choose file of type "app" default location (path to applications folder)
-- Get the app name
tell application "System Events"
set theAppName to name of theApp
if theAppName ends with ".app" then set theAppName to text 1 thru -5 of theAppName
-- Determine whether the app is a package, and notify the user if it's not
set isPackage to (package folder of theApp)
@ttscoff
ttscoff / bid.sh
Created July 31, 2012 20:27
Retrieve Bundle Identifiers for OS X applications using semi-fuzzy string matching
bid() {
local shortname location
# combine all args as regex
# (and remove ".app" from the end if it exists due to autocomplete)
shortname=$(echo "${@%%.app}"|sed 's/ /.*/g')
# if the file is a full match in apps folder, roll with it
if [ -d "/Applications/$shortname.app" ]; then
location="/Applications/$shortname.app"
else # otherwise, start searching