This file contains hidden or 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
def pom = new XmlSlurper().parse(new File('pom.xml')) | |
println 'my pom version ' + pom.version |
This file contains hidden or 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
defaultTasks 'hello' | |
repositories { | |
mavenCentral() | |
} | |
configurations { | |
mavenAntTasks | |
} | |
dependencies { | |
mavenAntTasks 'org.apache.maven:maven-ant-tasks:2.1.3' |
This file contains hidden or 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
brew uninstall ideviceinstaller | |
brew uninstall libimobiledevice | |
brew uninstall usbmuxd | |
brew install usbmuxd --HEAD | |
brew install --HEAD libimobiledevice | |
brew unlink libimobiledevice && brew link libimobiledevice | |
brew install --HEAD ideviceinstaller | |
brew unlink ideviceinstaller && brew link ideviceinstaller | |
sudo chmod -R 777 /var/db/lockdown |
This file contains hidden or 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
import botocore | |
import boto3 | |
import datetime | |
from dateutil.tz import tzlocal | |
from botocore.credentials import DeferredRefreshableCredentials | |
from botocore.session import Session | |
def assumed_role_session(role_arn: str, base_session: botocore.session.Session = None): | |
base_session = base_session or boto3.session.Session()._session |
This file contains hidden or 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 datetime import datetime | |
from dateutil import tz | |
# METHOD 1: Hardcode zones: | |
from_zone = tz.gettz('UTC') | |
to_zone = tz.gettz('America/New_York') | |
# METHOD 2: Auto-detect zones: | |
from_zone = tz.tzutc() | |
to_zone = tz.tzlocal() |
This file contains hidden or 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
Skip compile -Dmaven.main.skip | |
Skip exec -Dexec.skip |
This file contains hidden or 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 botocore.credentials import RefreshableCredentials | |
from botocore.session import get_session | |
from boto3 import Session | |
def assumed_session(role_arn, session_name, session=None): | |
"""STS Role assume a boto3.Session | |
With automatic credential renewal. |
This file contains hidden or 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
# Took this: | |
# https://s3.amazonaws.com/awsiammedia/public/sample/SAMLAPICLIADFS/samlapi_formauth_adfs3.py | |
# converted to boto3 and smooshed it together with this: | |
# https://gist.github.com/kapilt/ac8e222081f63ba64e93 | |
# which gave birth too this: | |
import sys | |
import botocore | |
import boto3 | |
import requests |
This file contains hidden or 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
Steps for installing the Android Emulator from EC2 console: | |
----------------------------------------------------------- | |
sudo apt install default-jdk | |
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip | |
unzip sdk-tools-linux-4333796.zip -d android-sdk | |
sudo mv android-sdk /opt/ | |
export ANDROID_SDK_ROOT=/opt/android-sdk | |
echo "export ANDROID_SDK_ROOT=/opt/android-sdk" >> ~/.bashrc | |
echo "export PATH=$PATH:$ANDROID_SDK_ROOT/tools" >> ~/.bashrc | |
re-login |