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
1) Generate a private key and certificate signing request: | |
openssl genrsa -out ios_distribution.key 2048 | |
openssl req -new -key ios_distribution.key -out ios_distribution.csr -subj '/[email protected], CN=Example, C=US' | |
2) Upload CSR to apple at: https://developer.apple.com/account/ios/certificate/create | |
- choose Production -> App Store and Ad Hoc | |
3) Download the resulting ios_distribution.cer, and convert it to .pem format: |
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
extends Node | |
class_name A | |
func name_func(): | |
return "foo" | |
func say_hello(): | |
name = name_func() | |
print("Hello " + name) |
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
extends Node | |
@export var bpm:int | |
@export var nextLevel: PackedScene | |
var playerScene=preload("res://player.tscn") | |
@onready var playerNode: Node | |
# Called when the node enters the scene tree for the first time. |
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
func _integrate_forces(state): | |
# enforce min and max speed | |
# based on: https://godotengine.org/qa/44040/how-to-set-a-max-speed-of-a-rigidbody2d?show=44086#c44086 | |
# no, I don't totally understand the math | |
state.linear_velocity=state.linear_velocity.normalized()*clamp(state.linear_velocity.length(), 700, 1000) |
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' | |
Transform: AWS::Serverless-2016-10-31 | |
Resources: | |
ServerlessRestApi: | |
Type: 'AWS::Serverless::Api' | |
Properties: | |
StageName: Prod | |
DefinitionBody: | |
info: |
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 centos:7 | |
RUN yum install -y centos-release-scl https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm && \ | |
yum install -y rh-python36 rh-python36-mod_wsgi httpd24 postgresql10 && \ | |
echo "source scl_source enable rh-python36" > /etc/profile.d/scl_python.sh && \ | |
echo "source scl_source enable httpd24" > /etc/profile.d/scl_httpd.sh && \ | |
source /etc/profile && \ | |
pip3 install --no-cache-dir -U pip setuptools wheel virtualenv && yum clean all && rm -rf /var/cache/yum |
- Elasticsearch Internals
- Lucene Indexing
- Java Library
- Shard
- A shard is an instance of Lucene
- max # of documents in a shard is Integer.MAX_VALUE - 128
- clients do not refer to shards directly (use index instead
- What's in a shard?
- indexed document gets analyzed, put in buffer
- Lucene Indexing
- buffer defaults to 10% of node heap (set with indices.memory.index_buffer_size)
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
[root@d1e2b187-78bb-4979-4a61-ead7 ~]# ps ax | |
PID TTY STAT TIME COMMAND | |
1 ? Ss 0:00 /tmp/garden-init | |
6 ? Ss 0:01 httpd (mod_wsgi-express) -f /tmp/mod_wsgi-localhost:8000:0/httpd.conf -DMOD_WSGI_MPM_ENABLE_EVENT_MODULE -DMOD_WSGI_MPM_EXISTS_EVENT_MODULE -DMOD_WSGI_MPM_EXISTS_WOR | |
13 ? Ssl 0:00 /tmp/lifecycle/diego-sshd --allowedKeyExchanges= --address=0.0.0.0:2222 --allowUnauthenticatedClients=false --inheritDaemonEnv=true --allowedCiphers= --allowedMACs= | |
56 ? Sl 0:02 (wsgi:localhost:8000:0) -f /tmp/mod_wsgi-localhost:8000:0/httpd.conf -DMOD_WSGI_MPM_ENABLE_EVENT_MODULE -DMOD_WSGI_MPM_EXISTS_EVENT_MODULE -DMOD_WSGI_MPM_EXISTS_WOR | |
57 ? Sl 0:00 httpd (mod_wsgi-express) -f /tmp/mod_wsgi-localhost:8000:0/httpd.conf -DMOD_WSGI_MPM_ENABLE_EVENT_MODULE -DMOD_WSGI_MPM_EXISTS_EVENT_MODULE -DMOD_WSGI_MPM_EXISTS_WOR | |
72 ? Ssl 0:00 /etc/cf-assets/healthcheck/healthcheck -port=8000 -timeout=1000ms -liveness-interval=30 |
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 boto3 | |
from botocore.vendored import requests | |
client = boto3.client('cloudfront') | |
def handler(event, context): | |
for record in event['Records']: | |
key = record['s3']['object']['key'] | |
items = [key] | |
NewerOlder