Skip to content

Instantly share code, notes, and snippets.

View clear.py
def clear():
if sys.platform.startswith("linux"):
os.system("clear")
elif sys.platform.startswith("win32"):
os.system("cls")
elif sys.platform.startswith("darwin"):
os.system("clear")
View hypermarket-addon.sh-session
$ falcon addons init sfdc/ajna 
$ cat falcon/addons/main.tf
module "falcon_addon_ajna" { 
source = "tfregistry.registry.buildndeliver.aws-dev2-uswest2.aws.sfdc.cl/falcon-addons/ajna" 
version = "1.0" 
# any other config you might need, like resource_name
}
$ falcon inspect --local
@jkutner
jkutner / raspberry-pi-autoguider.md
Last active January 25, 2023 07:50
Raspberry Pi Autoguider for Astrophotography
View raspberry-pi-autoguider.md

This is an update to an older post about how to Turn a Raspberry Pi into an Astrophotography Autoguider. I rebuilt my autoguider from scratch with newer versions of the software. It's even a bit easier now.

Step 1: Install Raspberry Pi OS

Follow the official instructions and install the "Raspberry Pi OS with desktop and recommended software". All of the commands in the steps that follow are run from a terminal session on the Raspberry Pi.

Step 2: Install Git

View cloud-native-buildpacks.md

Joe's Cloud Native Buildpacks

View monorepo-project.toml
[project]
# ...
[[images]]
stack = "heroku-20"
path = "./modules/www"
name = "web-app"
[[images]]
stack = "heroku-18"
View gyro.py
def gyro_drive(self, speed, heading, distance):
self.robot.reset()
actual_distance = 0
while actual_distance < distance:
correction = self.gyro.angle() * -10
self.robot.drive(speed, correction)
wait(10)
actual_distance = self.robot.distance()
View builder.go
func (b *Builder) RegularBuild(group BuildpackGroup, workspaceDir, layersDir string) (*BuildMetadata, error) {
platformDir, err := filepath.Abs(b.PlatformDir)
if err != nil {
return nil, err
}
layersDir, err := filepath.Abs(layersDir)
if err != nil {
return nil, err
}
appDir, err := filepath.Abs(workspaceDir)
View sample-buildpack.toml
api = "<buildpack API version>"
[buildpack]
id = "<buildpack ID>"
name = "<buildpack name>"
version = "<buildpack version>"
homepage = "<buildpack homepage>"
clear-env = false
privileged = true
View tekton-buildpacks.yml
---
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: buildpacks-phases
labels:
app.kubernetes.io/version: "0.1"
annotations:
tekton.dev/pipelines.minVersion: "0.12.1"
tekton.dev/tags: image-build