Skip to content

Instantly share code, notes, and snippets.

@ayyybe
ayyybe / ccdl.command
Last active March 26, 2025 20:41
Adobe Offline Package Builder v0.1.2 (macOS only) --- No longer being maintained.
#!/bin/bash
CYAN="$(tput bold; tput setaf 6)"
RESET="$(tput sgr0)"
clear
if command -v python3 > /dev/null 2>&1; then
if [ $(python3 -c "print('ye')") = "ye" ]; then
clear
@codycodes
codycodes / change_raspberry_pi_hostname.sh
Last active January 9, 2019 11:42
Changes the hostname on your raspberry pi to what's set in $hostname (variable); can be passed in as a parameter or hard-coded into the script
#!/bin/bash
# see LICENSE file on this gist at gist.github.com/codycodes
# Requires root permissions. An easy way to run this script is to simply use "sudo bash change_raspberry_pi_hostname.sh"
# Changes the hostname on your raspberry pi to what's set in $hostname (variable)
# Can be passed in as a parameter by calling this script or set explicitly in this file
# Makes a backup of the hosts file (/etc/hosts.bak)
@codycodes
codycodes / get_stored_airport_wifi_passwords.js
Last active November 24, 2020 11:54
Two commands to get your current WiFi password or any WiFi password stored in your macOS keychain!
#!/bin/bash
get_current_wifi_password() {
# this command from http://bit.ly/2zWtUhQ
current_wifi=`/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | \
awk '/ SSID/ {print substr($0, index($0, $2))}'`
security find-generic-password -a "$current_wifi" -g | tail -0
}
get_wifi_password() {
@codycodes
codycodes / toggle_menu_bar_macos.scpt
Last active January 9, 2019 11:41
-- Toggle "Automatically hide and show the menu bar option using UI" -- Useful for when you want to maximize your screen real estate :) -- Please comment if you have any suggestions for improvements!
-- Toggle "Automatically hide and show the menu bar option using UI"
-- Useful for when you want to maximize your screen real estate :)
-- Please comment if you have any suggestions for improvements!
tell application "System Preferences"
activate
set current pane to pane id "com.apple.preference.General"
tell application "System Events"
delay 1
tell process "System Preferences"
@jakebathman
jakebathman / is_backblaze_uploading.sh
Created February 15, 2018 20:25
Determine if Backblaze is currently backing up files on macOS
#!/bin/sh
# This will look at the overviewstatus.xml file and
# determine if Backblaze is currently transmitting a file.
#
# Developed against:
# macOS 10.13.3
# Backblaze 5.2.0.172
BBSTATUS='/Library/Backblaze.bzpkg/bzdata/overviewstatus.xml'
@dardo82
dardo82 / wifi-passwd.sh
Last active January 9, 2019 14:30
Find Wi-Fi password
#!/bin/sh
airport="/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport"
security find-generic-password -w -a $($airport -I | awk '/ SSID: /{print $2}')
@danhallock
danhallock / gist:dad31f851f171114f13b9db839f01aeb
Created October 31, 2017 21:51
Apple Photos keyword list
Abacus
Abacuses
Abalone
Abalones
Abode
Abodes
Accordion
Accordions
Accoutrement
Accoutrements
@Sillium
Sillium / simplytel.js
Last active November 28, 2019 17:35
CasperJS script to check data usage of SimplyTel mobile phone contract
// Usage: casperjs simplytel.js <login> <password>
var casper = require('casper').create({
verbose: false,
logLevel: "info",
exitOnError: true
});
if (!casper.cli.has(0) || !casper.cli.has(1)) {
casper.echo("\nUsage: casperjs simplytel.js <login> <password>").exit();
property defaultAccountName : "iCloud"
property defaultFolderName : "Saved iCloud Tabs"
global html
global processedURLs
on appendLineWithURLItem(urlItem)
my appendHTML(" <li>")
my appendHTML("<a href=\"" & |url| of urlItem & "\">")
my appendHTML(|Title| of urlItem)
@josefnpat
josefnpat / no-vim-ads.patch
Created January 10, 2015 20:38
Remove "ads" from vim
diff -r b3bc99b909c3 src/version.c
--- a/src/version.c Sat Jan 10 15:09:25 2015 +0100
+++ b/src/version.c Sat Jan 10 15:37:45 2015 -0500
@@ -2353,9 +2353,6 @@
#endif
N_("Vim is open source and freely distributable"),
"",
- N_("Help poor children in Uganda!"),
- N_("type :help iccf<Enter> for information "),
- "",