Skip to content

Instantly share code, notes, and snippets.

View asmattic's full-sized avatar

Matt Oldfield asmattic

View GitHub Profile
@asmattic
asmattic / raspberry-pi-git-repo-setup-on-boot.sh
Created October 19, 2020 02:47
Raspberry Pi Boot Script: Run config, pull or clone git repo, copy repo folder containing the pi specific project, run any config on that working folder, run next script
#!/bin/bash
# For now, I know user home
user_home=${HOME}
echo "Go to ${user_home} dir"
echo ""
cd $user_home
# Any startup scripts you want to run before updating the git repo
function toHex(num) {
const base = 16;
const hexVals = '0123456789abcdef';
let hex = [];
let sign = 1;
if(num === 0) return '0';
if(num < 0) {
sign = -1;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[add your bin description]">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[add your bin description]">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[add your bin description]">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[add your bin description]">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@asmattic
asmattic / windows-terminal-settings.js
Created September 16, 2020 21:27
Window Terminal Settings
// This file was initially generated by Windows Terminal 1.2.2381.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@asmattic
asmattic / repfabric-subscription-popup-cookie.js
Created September 16, 2020 03:48
repfabric-subscription-popup-cookie