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
version: "3.8" | |
services: | |
dynamodb: | |
image: amazon/dynamodb-local:2.3.0 | |
container_name: dynamodb | |
ports: | |
- 8000:8000 | |
command: -jar DynamoDBLocal.jar -dbPath /data -sharedDb | |
volumes: |
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
#!/usr/bin/env bash -e | |
if [[ $(whoami) != "root" ]]; then | |
echo "Must be run as root user." | |
exit 1 | |
fi | |
chmod +w /etc/pam.d/sudo | |
# Insert following text in line 2 | |
# auth sufficient pam_tid.so | |
chmod -w /etc/pam.d/sudo |
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
#!/bin/bash -e | |
gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_PASS_PHRASE" --output /path/to/output_file /path/to/encrypted_file |
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
AWSTemplateFormatVersion: 2010-09-09 | |
Parameters: | |
AMIId: | |
ConstraintDescription: Please choose AMIId | |
Description: Base image id for macOS | |
Type: AWS::EC2::Image::Id | |
KeyName: | |
ConstraintDescription: Must be the name of an existing EC2 KeyPair | |
Type: AWS::EC2::KeyPair::KeyName | |
Resources: |
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
# pip install pyjwt requests cryptography | |
# and put "app-store-connect-api-key.json" in this script directory | |
import json | |
import time | |
from datetime import datetime, timedelta | |
from pathlib import Path | |
import jwt | |
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
class custom_profile(object): | |
def __init__(self, name=None, _dynamic=False): | |
super().__init__() | |
def __new__(cls, *args, **kwargs): | |
try: | |
from silk.profiling.profiler import silk_profile | |
except ImportError: | |
class silk_profile(object): |
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 Foundation | |
struct AnyError: Error { | |
let error: Error | |
init(_ error: Error) { | |
self.error = error | |
} | |
} |
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 asyncio | |
class Sample(object): | |
def start(self, **kwargs): | |
loop = asyncio.get_event_loop() | |
return loop.run_until_complete(self.create_tasks(loop, **kwargs)) | |
async def create_tasks(self, loop, **kwargs): |
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
""" | |
pip install git+https://github.com/nnsnodnb/python-apns.git@payload#egg=gobiko.apns | |
https://github.com/nnsnodnb/python-apns/tree/payload | |
""" | |
from gobiko.apns.client import APNsClient | |
from gobiko.apns.payload import PayloadAlert, Payload | |
import jwt |
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
#!/usr/bin/env python | |
# coding: utf-8 | |
""" | |
This script file automatically inserts the import of the libraries used for 'ResourceKit'. | |
Insert new 'Run Script' before 'Compile Sources' in Build Phases. | |
And fill this code. | |
python $SRCROOT/script/generated_resource.py LIBRARY_1 LIBRARY_2 LIBRARY_3 ... |
NewerOlder