Skip to content

Instantly share code, notes, and snippets.

View AaronNGray's full-sized avatar

Aaron Gray AaronNGray

View GitHub Profile
var templateFn = _.template($('#navigation_template').html());
$(this.el).html(templateFn({model: this.model, templateFn: templateFn}));
<script id="navigation_template" type="text/template">
<div>
<%= model.escape('title') %>
<% _.each(model.children, function(child) { %>
<%= templateFn(child, templateFn) %>
<% }); %>
@AaronNGray
AaronNGray / keybase.md
Created April 2, 2015 06:33
keybase.md

Keybase proof

I hereby claim:

  • I am AaronNGray on github.
  • I am aaronngray (https://keybase.io/aaronngray) on keybase.
  • I have a public key whose fingerprint is 6B48 23DC 6DEA 7356 21B6 DBA4 3292 D183 A8B8 4F5B

To claim this, I am signing this object:

<!--
@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
-->
@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()) {
@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 / 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 / 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 / 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