Skip to content

Instantly share code, notes, and snippets.

View AaronNGray's full-sized avatar

Aaron Gray AaronNGray

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<!-- Copyright (c) 2018 Aaron Nathaniel Gray -->
<script>
document.addEventListener('WebComponentsReady', function() {
console.log("WebComponentsReady", Math.round(performance.now()));
document.body.appendChild(
document.createTextNode("WebComponentsReady: " + Math.round(performance.now()) + "ms")
);
@AaronNGray
AaronNGray / introspection-query.graphql
Created June 18, 2018 23:29 — forked from craigbeck/introspection-query.graphql
Introspection query for GraphQL
query IntrospectionQuery {
__schema {
queryType { name }
mutationType { name }
subscriptionType { name }
types {
...FullType
}
directives {
@AaronNGray
AaronNGray / uEnv.txt
Created June 14, 2018 01:44
BPI-M3 SATA boot (not working)
#
## uEnv.txt
#
bpi=bananapi
board=bpi-m3
chip=a83t
service=linux
#
#
#fex2bin sys_config.fex > script.bin
@AaronNGray
AaronNGray / stretch.input
Created June 8, 2018 23:13
Stretch update keyboard input file
Y
Y
Y
Q
@AaronNGray
AaronNGray / stretch.sh
Last active June 8, 2018 23:21
Raspbian 'Stretch' upgrade
cat >stretch.in <<EOF
Y
Y
Y
Q
EOF
cp /etc/apt/sources.list /etc/apt/sources.list.jessie
sed -e "s/jessie/stretch/g" /etc/apt/sources.list >/etc/apt/sources.list.stretch
@AaronNGray
AaronNGray / make.sh
Last active June 13, 2018 19:57
make.sh for making SSD from SDCard root
cp -r /bin /mnt/sda2
cp -r /boot /mnt/sda2
#cp /dev /mnt/sda2
cp -r /etc /mnt/sda2
cp -r /home /mnt/sda2
cp -r /lib /mnt/sda2
cp -r /lost+found /mnt/sda2
cp -r /man /mnt/sda2
#cp -r /media /mnt/sda2
#cp -r /mnt /mnt/sda2
@AaronNGray
AaronNGray / fstab
Created June 7, 2018 23:51
/etc/fstab for BananaPi Raspbian Stretch with SATA SSD
proc /proc proc defaults 0 0
/dev/mmcblk0p1 /boot vfat defaults 0 2
/dev/sda2 / ext4 errors=remount-ro 0 1
/dev/sda3 none swap sw 0 0
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that
@AaronNGray
AaronNGray / docker-clone&build&push
Last active June 2, 2018 20:56
build a Docker GitHub repo and push to docker.io
build a Docker image from a GitHub repo and push to docker.io :-
sudo docker build -t aaronngray/bpi-build:bpi-build github.com/AaronNGray/bpi-build
sudo docker push aaronngray/bpi-build
@AaronNGray
AaronNGray / LL1.cpp
Created May 5, 2017 22:58
LL1 parser table generation
//
// lib/ParserGenerator/LL1/LL1.cpp
//
// Copyright (c) 2017 Aaron Nathaniel Gray under the MIT License
//
#include "lib/ParserGenerator/LL1/LL1.h"
void LL1::GenerateStatesAndTransitions() {
for (auto nonTerminal : getNonTerminals()) {
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->