Skip to content

Instantly share code, notes, and snippets.

View rosskarchner's full-sized avatar
🤘
ROLLBACK_COMPLETE

Ross M Karchner rosskarchner

🤘
ROLLBACK_COMPLETE
View GitHub Profile
@rosskarchner
rosskarchner / Readme.txt
Created December 11, 2023 17:49 — forked from jcward/Readme.txt
Generating iOS P12 / certs without Mac OSX Keychain (on linux, windows, etc)
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 '/emailAddress=me@example.com, 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:
extends Node
class_name A
func name_func():
return "foo"
func say_hello():
name = name_func()
print("Hello " + name)
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.
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)
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Resources:
ServerlessRestApi:
Type: 'AWS::Serverless::Api'
Properties:
StageName: Prod
DefinitionBody:
info:

Network Defense Management

Network Attacks and Defense Strategies

Explain essential terminologies related to network security attacks

Describe the various examples of network-level attack techniques

Describe the various examples of host-level attack techniques

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
@rosskarchner
rosskarchner / gist:2381ca5f8136f72b3718ca8353a7d5cc
Last active July 16, 2023 14:13
Notes from Elasticsearch Engineer II training
  • 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
  • buffer defaults to 10% of node heap (set with indices.memory.index_buffer_size)
[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
@rosskarchner
rosskarchner / index.py
Created March 8, 2019 15:40
automatically invalidate URL's in cloudfront when a file is updated in S3
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]