Skip to content

Instantly share code, notes, and snippets.

@bmsleight
bmsleight / squircle.scad
Last active November 6, 2022 13:15
OpenSCAD squircle
/* An OpenSCAD squircle
Copyright (C) 2022 by Brendan M. Sleight
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
https://en.wikipedia.org/wiki/Squircle
A squircle is a shape intermediate between a square and a circle.
A superellipse, where x^4 + y^4 = 1.
# SPDX-License-Identifier: LGPL-3.0-or-later
# Copyright (C) 2020 Daniel Thompson
"""Logo demo for PineTime
~~~~~~~~~~~~~~~~~~~~~~~~~
This demo is simply an alternating sweep of the Pine64 and
MicroPython logos. It cycles through a variety of colours
and swaps between the logos every 5 images (so if you change
anything make sure len(colors) is not a multiple of 5).
@bmsleight
bmsleight / stand.scad
Created February 24, 2021 20:58
Simple Kindle Stand
include <lasercut.scad>;
$fn=60;
thickness = 0.36;
overlapfactor=20;
overlap_distance=overlapfactor*thickness;
kindle_x=117;
kindle_y=169;
mosquitto_pub -h localhost -t "owntracks/bms/WorkPhone/cmd" -m '{"_type":"cmd","action":"setConfiguration","configuration":{"_type":"configuration","monitoring":1}}' -u "bms" -P "XXXX"
@bmsleight
bmsleight / Gödel, Escher, Bach.scad
Created February 16, 2019 18:45
Gödel, Escher, Bach.scad
$fn=100;
words("ILOVEYOU", "OPENSCAD");
module single_letter(tx,ty, ifont, size)
{
scale([size/10, size/10,size/10])
{
intersection() {
translate([0,10,0]) rotate([90,0,0]) linear_extrude(height =10) text(tx, font = ifont);
@bmsleight
bmsleight / gist:9091c63965507f1508594de0ac2ce8e9
Created February 16, 2019 18:45
OpenSCAD Gödel, Escher, Bach
$fn=100;
words("ILOVEYOU", "OPENSCAD");
module single_letter(tx,ty, ifont, size)
{
scale([size/10, size/10,size/10])
{
intersection() {
translate([0,10,0]) rotate([90,0,0]) linear_extrude(height =10) text(tx, font = ifont);
<VirtualHost *:80>
ServerName paperless.lan
Alias /static/ /home/paperless/paperless/static/
<Directory /home/paperless/paperless/static>
Require all granted
</Directory>
WSGIScriptAlias / /home/paperless/paperless/src/paperless/wsgi.py
WSGIDaemonProcess paperless.lan user=paperless group=paperless threads=5
#!/usr/bin/env bash
# Bash script to instal paperless in lxc containter
# Get apt up to date
apt-get update
# Needed for plain Paperless
apt-get -y install unpaper gnupg libpoppler-cpp-dev python3-pyocr tesseract-ocr imagemagick optipng
@bmsleight
bmsleight / gist:9f7da2360f856f8ca45c392be7e652ab
Created December 7, 2018 21:57 — forked from rnixx/gist:add38d808b5a8ad73947
Kivy App - Sticky hiding of navigation on Android
from kivy.app import App
from kivy.logger import Logger
try:
from jnius import autoclass
from android.runnable import run_on_ui_thread
android_api_version = autoclass('android.os.Build$VERSION')
AndroidView = autoclass('android.view.View')
AndroidPythonActivity = autoclass('org.renpy.android.PythonActivity')
#!/bin/bash
end=$(($1 + $2))
lstart=$(($1 + 1))
for i in `seq $lstart $end`;
do
start=$(printf %03d $1);
counter=$(printf %03d $i);
cp $3/frame_$start.gif $3/frame_$counter.gif
done