Skip to content

Instantly share code, notes, and snippets.

View joer14's full-sized avatar

Joe Rowley joer14

View GitHub Profile
@bishboria
bishboria / springer-free-maths-books.md
Last active April 25, 2024 06:27
Springer made a bunch of books available for free, these were the direct links
@parmentf
parmentf / GitCommitEmoji.md
Last active May 16, 2024 19:31
Git Commit message Emoji
@mariocesar
mariocesar / admin.py
Last active December 28, 2023 19:17
Django admin decorator to create a confirmation form action, like the default delete action works
from .models import Post, Category
from .decorators import action_form
class PostCategoryForm(forms.Form):
title = 'Update category for the selected posts'
myfile = forms.FileField()
category = forms.ModelChoiceField(queryset=Category.objects.all())

How to setup AWS lambda function to talk to the internet and VPC

I'm going to walk you through the steps for setting up a AWS Lambda to talk to the internet and a VPC. Let's dive in.

So it might be really unintuitive at first but lambda functions have three states.

  1. No VPC, where it can talk openly to the web, but can't talk to any of your AWS services.
  2. VPC, the default setting where the lambda function can talk to your AWS services but can't talk to the web.
  3. VPC with NAT, The best of both worlds, AWS services and web.
@midwire
midwire / git-merged-branches.rb
Last active August 31, 2021 16:00
A script to list all remote branches that have been merged into a specified branch. Optionally exclude branches with recent commits. Written to help in deleting old merged branches.
#!/usr/bin/env ruby
#
# Get a list of merged branches
#
# You need to checkout the target remote branch before running. In other words,
# if your target branch is 'master', you have to have it checked out before you
# run this script, otherwise you will get an error like: `fatal: malformed
# object name master`. Git needs to have the branch checked out in order to find
# the branches that have/have-not been merged into it.
#
@djshen-ponddy
djshen-ponddy / customize_wsgi.config
Created October 13, 2017 06:20
Customize AWS Elastic Beanstalk wsgi.conf without being wiped out after update of environment variables
files:
"/opt/elasticbeanstalk/hooks/configdeploy/pre/99patchwsgi.py": &file
mode: "000755"
owner: root
group: root
content: |
#!/usr/bin/env python
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
@quiver
quiver / iam-policy.json
Last active April 23, 2024 07:02
How to connect to Amazon RDS PostgreSQL with IAM credentials
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"rds-db:connect"
],
"Resource": [
"arn:aws:rds-db:region:account-id:dbuser:dbi-resource-id/database-user-name"
@karanlyons
karanlyons / ZoomDaemon.yara
Last active July 12, 2021 14:07
Fixes for Zoom, RingCentral, Zhumu (and additional white labels) RCE vulnerabilities
private rule Macho
{
meta:
description = "private rule to match Mach-O binaries (copied from Apple's XProtect)"
condition:
uint32(0) == 0xfeedface or uint32(0) == 0xcefaedfe or uint32(0) == 0xfeedfacf or uint32(0) == 0xcffaedfe or uint32(0) == 0xcafebabe or uint32(0) == 0xbebafeca
}
rule ZoomDaemon
{