Skip to content

Instantly share code, notes, and snippets.

View jake's full-sized avatar
🤠
🤠

Jacob Bijani jake

🤠
🤠
View GitHub Profile
@instantiator
instantiator / cloud-formation-vpc-with-internet.md
Last active April 26, 2024 15:50
AWS CloudFormation/SAM templates for an app that places lambdas inside a VPC, and restores their internet access

Sometimes you need to move your application lambdas inside VPC subnets (eg. if you need them to be able to access an RDS cluster, or another service that doesn't mesh perfectly with serverless). Doing so removes them from the default VPC, and with that they lose internet access.

The templates included here show how you can deploy lambdas inside a VPC, and create a route for them back to the internet.

You can still use API Gateway and trigger your lambdas with events, but now they'll be able to reach the internet, too.

template.yaml creates the VPC, which is then used by all the other resources.

@todbot
todbot / esp32s2-test.py
Last active December 29, 2023 07:00
CircuitPython WiFi example for ESP32-S2-WROOM Saola
# esp32s2-test.py -- small WiFi test program for ESP32-S2 CircuitPython 6
# taken from https://www.reddit.com/r/circuitpython/comments/ianpm8/using_wifi_when_running_on_esp32s2saola1_board/
#
import time
import ipaddress
import wifi
import socketpool
import ssl
import adafruit_requests
@jbesw
jbesw / gist:f9401b4c52a7446ef1bb71ceea8cc3e8
Created August 4, 2020 11:39
AWS CloudFormation template to create public/private subnets in a VPC with a NAT Gateway.
# This creates a VPC with two public subnets and two private subnets in two Availability Zones,
# together with a NAT Gateway and associated routing. Change the Availability Zone locations as needed.
# Important: this configures various AWS services and there are costs associated with these services after the Free Tier usage.
# Please see the AWS Pricing pages for details. You are responsible for any AWS costs incurred.
# No warranty is implied in this example.
# Usage from command line:
# aws cloudformation --region <<YOUR-REGION>> create-stack --stack-name vpc- --template-body file://vpc-setup.yaml

DaVinci Resolve Scripting Documentation

Updated as of 08 March 2019


In this package, you will find a brief introduction to the Scripting API for DaVinci Resolve Studio. Apart from this README.txt file, this package contains folders containing the basic import modules for scripting access (DaVinciResolve.py) and some representative examples.

Overview

As with Blackmagic Design Fusion scripts, user scripts written in Lua and Python programming languages are supported. By default, scripts can be invoked from the Console window in the Fusion page, or via command line. This permission can be changed in Resolve Preferences, to be only from Console, or to be invoked from the local network. Please be aware of the security implications when allowing scripting access from outside of the Resolve application.

@dpid
dpid / how-to-notarize-unity-for-macos.md
Last active December 6, 2023 20:42
How to notarize a Unity build for MacOs 10.15 Catalina

How to notarize a Unity build for macOs 10.15 Catalina

As of January 2020, all apps running on macOs 10.15 Catalina are required to be notarized. For Unity games distributed outside the Mac App Store, such as with Steam, the notarization process is done post build using a series of Xcode command line tools.

Prerequisites

  • a Mac that is compatible with macOs 10.15 Catalina :
    • MacBook (2015 or newer)
    • MacBook Air (2012 or newer)
  • MacBook Pro (2012 or newer)
@asdine
asdine / logging.go
Last active September 17, 2022 23:40
Send zerolog errors to Sentry
package logger
import (
"encoding/json"
"fmt"
"io"
"log"
"os"
"runtime"
"time"
using UnityEngine;
using System.Collections;
public class BusController : MonoBehaviour
{
protected static readonly float ATTACK_MODIFIER = 7f;
protected static readonly float FLIGHT_MODIFIER = 250f;
protected static readonly float BRAKE_MODIFIER = -0.7f;
protected static readonly float PITCH_CORRECT_TARGET_TIME = 0.2f;
@sketchpunk
sketchpunk / QuaterionSpring.js
Created November 17, 2018 06:07
Spring Physics - Oscillation and Critical Dampening on Quaternions
// Resources
// https://burakkanber.com/blog/physics-in-javascript-car-suspension-part-1-spring-mass-damper/
// https://gafferongames.com/post/spring_physics/
// https://gafferongames.com/post/physics_in_3d/
// http://digitalopus.ca/site/pd-controllers/
// .. Has things about Torque
class QuaterionSpring{
constructor( damping=5, stiffness=30 ){
this.velocity = new Float32Array(4);
@matux
matux / scntool.md
Last active April 11, 2023 13:49
SceneKit scntool command line options
$ xcrun scntool --verbose
| Current SceneKit version is 4.560000
| Running scntool (compiled on Jul  1 2018 01:01:55)

usage: scntool --convert file --format format [--output file]
000084a8:  7363 7269 7074 696f 6e00 2d2d 7461 7267 6574 2d70 6c61 7466  :scription.--target-platf
@rwb27
rwb27 / set_picamera_gain.py
Last active April 27, 2023 15:09
Manually setting gain of raspberry pi camera from within python
from __future__ import print_function
import picamera
from picamera import mmal, mmalobj, exc
from picamera.mmalobj import to_rational
import time
MMAL_PARAMETER_ANALOG_GAIN = mmal.MMAL_PARAMETER_GROUP_CAMERA + 0x59
MMAL_PARAMETER_DIGITAL_GAIN = mmal.MMAL_PARAMETER_GROUP_CAMERA + 0x5A