Skip to content

Instantly share code, notes, and snippets.

Avatar

Sean Marquez capsulecorplab

View GitHub Profile
@capsulecorplab
capsulecorplab / how_to_setup_GHCR_for_kasm_workspace_images.md
Last active Jul 31, 2022
How to setup GHCR for kasm workspace images
View how_to_setup_GHCR_for_kasm_workspace_images.md
@capsulecorplab
capsulecorplab / clockdrive_nema17_cg4_drv8825.ino
Last active Jul 23, 2022
Arduino sketch for running clockdrive with DRV8825 on Nema17 stepper motor on CG-4 mount
View clockdrive_nema17_cg4_drv8825.ino
// Define pin connections & motor's steps per revolution
const int dirPin = 2;
const int stepPin = 3;
const int stepsPerRevolution = 200;
void setup()
{
// Declare pins as Outputs
pinMode(stepPin, OUTPUT);
pinMode(dirPin, OUTPUT);
@capsulecorplab
capsulecorplab / temp_sensor.py
Last active Jul 17, 2022
micropython class for reading temperature using DS18B20
View temp_sensor.py
import machine, onewire, ds18x20, time
class DS18B20:
def __init__(self, ds_pin: int = 4):
self.ds_pin = machine.Pin(ds_pin, machine.Pin.IN)
self.ds_sensor = ds18x20.DS18X20(onewire.OneWire(self.ds_pin))
def read_temperature(self, verbose: bool = False) -> float:
if verbose == True:
@capsulecorplab
capsulecorplab / .gitconfig
Created Mar 16, 2022
.gitconfig for git aliases
View .gitconfig
[alias]
a = add
ap = add -p
b = branch -v
bd = branch -d -v
bD = branch -D -v
cl = clone
clr = clone --recurse-submodules
@capsulecorplab
capsulecorplab / LICENSE
Last active Jun 1, 2021
BlackBelt Cura profiles
View LICENSE
MIT License
Copyright (c) 2021 @capsulecorplab
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@capsulecorplab
capsulecorplab / install-arduino.sh
Last active Jan 2, 2021
bash script for installing arduino on 64bit Linux
View install-arduino.sh
#!/usr/bin/env bash
# artifacts
arduinosource=arduino-1.8.13
# arduino
if ! command -v arduino &>/dev/null; then
if [ ! -r ~/$arduinosource ]; then
curl -L "https://downloads.arduino.cc/arduino-1.8.13-linux64.tar.xz" -o ~/$arduinosource.tar.xz
tar -xvf ~/$arduinosource.tar.xz -C ~/
@capsulecorplab
capsulecorplab / .gitignore
Last active Apr 1, 2021
plantuml template for specifying stakeholder needs & user stories
View .gitignore
# Asciidoctor
.asciidoctor/
@capsulecorplab
capsulecorplab / install-kpcli.sh
Last active Nov 27, 2020
bash script for installing kpcli on Ubuntu/Debian
View install-kpcli.sh
#!/usr/bin/env bash
# http://kpcli.sourceforge.net/
if ! command -v kpcli &> /dev/null; then
wget 'https://downloads.sourceforge.net/project/kpcli/kpcli-3.6-1.deb'
sudo apt install -y ./kpcli-3.6-1.deb
rm kpcli-3.6-1.deb
fi
@capsulecorplab
capsulecorplab / install-keybase.sh
Last active Nov 24, 2020
bash script for installing keybase on 64bit Ubuntu
View install-keybase.sh
#!/usr/bin/env bash
# https://keybase.io/docs/the_app/install_linux
curl --remote-name https://prerelease.keybase.io/keybase_amd64.deb
sudo apt install ./keybase_amd64.deb
rm keybase_amd64.deb
run_keybase