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 python | |
import base64 | |
from botocore.exceptions import ClientError | |
import boto3 | |
import json | |
import logging | |
import os | |
def send_sqs_message(sqs_queue_url, body,attrs): | |
sqs_client = boto3.client('sqs') |
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 Finder not open window on click | |
rm -f ~/Library/Preferences/com.apple.finder.plist | |
/usr/bin/killall Finder | |
/usr/bin/open -a Finder |
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
defaults write .GlobalPreferences com.apple.sound.beep.sound /System/Library/Sounds/Basso.aiff |
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 +x; } 2>/dev/null | |
set ~/Applications/name.app | |
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -f "$@" |
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/sbin/networksetup -getairportpower en1 # On/Off | |
/usr/sbin/networksetup -getairportpower en1 | grep -iq "On" | |
# /usr/sbin/networksetup -setairportpower en0 on | |
# /usr/sbin/networksetup -setairportpower en0 off | |
export PATH="/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources":$PATH | |
airport -s |
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
sudo find /var/log/postgresql -name '*.log' | |
sudo find /var/log/postgresql -name '*.log' -exec rm {} \; |
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 python | |
import imaplib | |
import email | |
# Sign in using App Passwords | |
# https://support.google.com/accounts/answer/185833 | |
# App passwords | |
# https://myaccount.google.com/security |
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
curl https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py | |
python /tmp/get-pip.py | |
python -c "import pip;print(pip.__version__)" |
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
curl http://169.254.169.254/latest/meta-data/local-ipv4 |
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
from django.contrib.auth.models import User | |
try: | |
user = User.objects.get(username="username") | |
user.set_password('password') | |
user.save() | |
except DoesNotExist: | |
pass |