Skip to content

Instantly share code, notes, and snippets.

View vineetchawla's full-sized avatar

VINEET CHAWLA vineetchawla

View GitHub Profile
@Gabelbombe
Gabelbombe / automate.sh
Last active October 9, 2022 17:02
AppleScript to automate Keychain acceptance
function Accepts ()
{
osascript <<EOF
tell application "System Events"
repeat while exists (processes where name is "SecurityAgent")
tell process "SecurityAgent" to click button "Allow" of window 1
delay 0.2
end repeat
end tell
EOF
@naholyr
naholyr / npm-check-used.sh
Created April 12, 2016 08:40
Check if your npm dependencies are actually used
#!/bin/bash
# Run from your project's root
# Run "npm install" or "npm update" before
# Requirement: jq (https://stedolan.github.io/jq/)
required () {
grep -R "from ['\"]${1}[\\/'\"]\|require(['\"]${1}[\\/'\"]" --exclude-dir=node_modules --include='*.js' > /dev/null
}