This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# set -e | |
# set -x | |
plistbuddy="/usr/libexec/PlistBuddy" | |
airport_output=$(/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s -x) | |
wlan_sp_airport_data_type=$(system_profiler SPAirPortDataType) | |
scandata=./scandata.plist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Assumes dnsmasq is available and you have 127.0.0.1 and ::1 configured at the top of your DNS settings in | |
# /etc/resolv.conf | |
# Also assumes you have previously provided the plist as per: | |
# sudo cp $(brew list dnsmasq | grep /homebrew.mxcl.dnsmasq.plist$) /Library/LaunchDaemons/ | |
if [[ "$1" == "on" ]]; then | |
sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
info 18:12:38.524332+0000 Finder _LSLaunchRB(com.pansift.p3bar <private>, event=aevt/oapp, args=- 0x10040/async opts=(null) | |
info 18:12:38.529306+0000 Finder LAUNCH:_LSLaunchThruRunningboard: com.pansift.p3bar / <private> | |
info 18:12:38.531795+0000 Finder LAUNCH: Launching with process identity application.com.pansift.p3bar.9105111818.9105112056, com.pansift.p3bar <private> | |
info 18:12:38.532066+0000 Finder Sending launch request: <RBSLaunchRequest| app<application.com.pansift.p3bar.9105111818.9105112056(501)>; "LS launch com.pansift.p3bar"> | |
default 18:12:38.532494+0000 runningboardd Launch request for app<application.com.pansift.p3bar.9105111818.9105112056(501)> is using uid 501 (divined from auid 501 euid 501) | |
default 18:12:38.532630+0000 runningboardd Acquiring assertion targeting app<application.com.pansift.p3bar.9105111818.9105112056(501)> from originator [daemon<com.apple.Finder(501)>:586] with description <RBSAssertionDescriptor| "LS launch com.pansift.p3bar" ID:166-586-254678 target:app<application.com. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example 1 of 2 | |
<dict> | |
<key>80211D_IE</key> | |
<dict> | |
<key>IE_KEY_80211D_CHAN_INFO_ARRAY</key> | |
<array> | |
<dict> | |
<key>IE_KEY_80211D_FIRST_CHANNEL</key> | |
<integer>36</integer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- https://stackoverflow.com/questions/34876073/switch-network-link-conditioner-profiles-from-console-script/38991769 | |
-- found via https://gist.github.com/cantyjeffrey/42a0d080c83c46a6f76e5705fd6d90af | |
set mode to system attribute "mode" | |
tell application "System Preferences" | |
activate | |
set current pane to pane "com.apple.Network-Link-Conditioner" | |
delay 1 | |
end tell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# This relies on the throttle.applescript | |
# https://gist.github.com/donalod/7c0a63df318aff3739e72f7ad9ec3854 | |
# Run it via crontab BUT YOU MUST ALLOW CRON IN "SECURITY & PRIVACY / ACCESSIBILITY" | |
# * */2 * * * /Users/administrator/pansift_demo_throttle.sh >/tmp/stdout.log 2>/tmp/stderr.log | |
timestamp=$(date "+%Y%m%dT%H%M%S%z") | |
echo "Starting at $timestamp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Webflow = Webflow || []; | |
Webflow.push(function () { | |
//var query = window.location.pathname.split("/").slice(-1).toString().replace(/-/g, " "); | |
var query = window.location.pathname.split("/").slice(-1).toString().replace(/-/g, " "); | |
if (query.split(" ").length == 3){ | |
query = query.split(" ")[0] | |
} | |
var options=""; | |
if (query.toLowerCase() == "slack") { | |
options="&restrictSearchableAttributes=vendor,product"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# TODO: Need to account for multi-commit history in current commit rather than just merges. | |
# This could be done possibly with BITBUCKET_BUILD_NUMBER -1 but that doesn't account | |
# for broken builds or previous commits. Perhaps inc BUILD status? Reminder, we're | |
# looking to pull a list of JSON files that require publishing. Not sure if we tell | |
# people to squash commits before push? :) | |
# TODO: We could build a new array of files or push them by checking all commits since head | |
# with smth like: git log @{u}.. | grep -iE "commit [[:alnum:]]{40}" | cut -f2 -d" " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo -e "Squashing last commits since push...\n" | |
git reset --soft HEAD~$(git log @{u}.. | grep -i commit | wc -l | tr -d ' ') && git commit -am "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [[ ${#1} = 0 ]]; then | |
echo "Note: First edit the script to update the JSON key and value to change." | |
echo "Usage: ./jq_replace_key_value_in_input_files.sh <file_glob_pattern>" | |
exit 0; | |
fi | |
key="og_image_url" |
NewerOlder