Skip to content

Instantly share code, notes, and snippets.

@cshotton
cshotton / minjson.md
Created April 11, 2023 11:23
Regex to Minify JSON
@cshotton
cshotton / github...ConcluentSystems...kilroy.erc721...NFTs...KilroyChainAppNFT.sol_flattened.sol
Created March 24, 2023 23:15
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.18+commit.87f61d96.js&optimize=false&runs=200&gist=
// File: https://github.com/ConcluentSystems/kilroy.erc721/blob/master/src/contracts/ownership/ownable.sol
pragma solidity ^0.8.0;
/**
* @dev The contract has an owner address, and provides basic authorization control whitch
* simplifies the implementation of user permissions. This contract is based on the source code at:
* https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/ownership/Ownable.sol
@cshotton
cshotton / svgviewer.html
Created February 1, 2023 12:54
One page app to view SVG source as image and PNG download
<html>
<head>
<title>myByways SVG to PNG Converter</title>
</head>
<body bgcolor="#E6E6FA">
<h1><a href="http://mybyways.com/blog/convert-svg-to-png-using-your-browser">myByways SVG to PNG Converter</a></h1>
<textarea id="t" rows="8" cols="70"></textarea><br/><br/>
<button id="l">Load SVG</button><br/><br/>
<div id="d"></div><br/>
Width: <input id="w" type="number" max="9999"></input>
@cshotton
cshotton / README.md
Created December 3, 2022 17:39
RasPi HDMI on/off

tvservice -o ... tvservice -p

// index.js
console.log ("Running...");
const Gpio = require('onoff').Gpio; // https://www.npmjs.com/package/onoff
const motion = new Gpio(17, 'in', 'both');
var Sound = require('node-aplay'); // https://www.npmjs.com/search?q=node-aplay
var music = new Sound('./loser.wav');
motion.watch ((err, value)=> {
@cshotton
cshotton / howto-fbi.md
Created November 20, 2019 18:38
fbi how-to

fbi -d /dev/fb0 -T 1 -a 'glenstone - 34.jpg'

Install fbi To install fim use the following commands :

sudo apt-get update sudo apt-get -y install fbi Use fbi To display a single image with the “auto-zoom” option use :