Skip to content

Instantly share code, notes, and snippets.

View map7's full-sized avatar

Michael Pope map7

  • Digitech Corporation
  • Melbourne, Victoria, Australia
View GitHub Profile
@map7
map7 / gist:6991f0f70809c81f487c8359321fa32d
Last active December 6, 2023 03:39
HTML CSS + Paged polyfill with header and footer
<html>
<head>
<script src="https://unpkg.com/pagedjs/dist/paged.polyfill.js"></script>
<style type="text/css">
.footer {
position: running(footerRunning);
}
@page {
@bottom-right {
@map7
map7 / gist:04afbfe817ad0a0d71ec8515176c41d6
Created September 20, 2023 13:20
mruby + ESP32 notes
- References
https://github.com/mruby-esp32/mruby-esp32
1. Install ESP-IDF Manually
[[https://docs.espressif.com/projects/esp-idf/en/release-v5.1/esp32/get-started/linux-macos-setup.html][Standard Toolchain Setup for Linux and macOS - ESP32 - — ESP-IDF Programming ...]]
a. Install required packages
: sudo apt-get install git wget flex bison gperf python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0
// A simple gamma look-up-table, stored in Program Memory
// To access the table, must use: pgm_read_byte()
#ifndef _INC_GAMMA8_H_
#define _INC_GAMMA8_H_
const uint8_t PROGMEM gamma8[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2,
/*
ColorduinoPlasma - Plasma demo using Colorduino Library for Arduino
Copyright (c) 2011 Sam C. Lin [email protected] ALL RIGHTS RESERVED
based on Color cycling plasma
Version 0.1 - 8 July 2009
Copyright (c) 2009 Ben Combee. All right reserved.
Copyright (c) 2009 Ken Corey. All right reserved.
Copyright (c) 2008 Windell H. Oskay. All right reserved.
Copyright (c) 2011 Sam C. Lin All Rights Reserved
/*
HelloWorld.ino
Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/)
Copyright (c) 2016, [email protected]
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
/*
HelloWorld.ino
Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/)
Copyright (c) 2016, [email protected]
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
#!/usr/bin/env python
import RPi.GPIO as GPIO # Import RPi GPIO Lib
import time
import os
def button_callback(channel):
print("Button was pushed!")
time.sleep(0.2)
********************************************************************************
Start of e2e
********************************************************************************
> @ e2e /home/map7/code/asset_management
> node ./node_modules/nativescript-dev-appium/check-dev-deps.js && tsc -p e2e && mocha --opts ./e2e/config/mocha.opts "--devMode" "false" "--runType" "device.samsung" "--verbose"
Parsed args: {"port":4723,"projectDir":"/home/map7/code/asset_management","projectBinary":"/home/map7/code/asset_management/node_modules/.bin","pluginRoot":"/home/map7/code/asset_management/node_modules/nativescript-dev-appium","pluginBinary":"/home/map7/code/asset_management/node_modules/nativescript-dev-appium/node_modules/.bin","wdaLocalPort":8410,"testFolder":"e2e","runType":"device.samsung","appiumCapsLocation":"/home/map7/code/asset_management/e2e/config/appium.capabilities.json","verbose":true,"cleanApp":false,"path":"/home/map7/code/asset_management","capabilitiesName":"appium.capabilities.json","driverCon
@map7
map7 / gist:bdcef100f7f9ecba38a439fed12bea53
Created March 20, 2020 04:30
debian 10 LTSP 20.3 install with chroot
- [-] Install *LTSP 20.3* on *debian10-ltsp*
- [X] Change to root
: su -
- [X] Configure PPA
The PPA gets updated before the repository (even debian testing)
: wget https://ltsp.org/misc/ltsp-ubuntu-ppa-bionic.list -O /etc/apt/sources.list.d/ltsp-ubuntu-ppa-bionic.list
: wget https://ltsp.org/misc/ltsp_ubuntu_ppa.gpg -O /etc/apt/trusted.gpg.d/ltsp_ubuntu_ppa.gpg
Enter user into 'plugdev' group by editing /etc/groups on the LTSP machine
Enter chroot
: ltsp-chroot -m
Add the following to chroot:/etc/polkit-1/localauthority/50-local.d/org.freedesktop.automount.pkla
: [Allow Unauthorized mounting/Unmounting]
: Identity=unix-group:plugdev;cdrom
: Action=org.freedesktop.udisks2.filesystem-*;org.freedesktop.udisks2.eject*
: ResultAny=yes