Skip to content

Instantly share code, notes, and snippets.

Avatar

Travis Webb tjwebb

View GitHub Profile
View Smalltalk Grammar
http://chronos-st.blogspot.com/2007/12/smalltalk-in-one-page.html
http://www.csci.csusb.edu/dick/samples/smalltalk.syntax.html
Formal EBNF Specification of Smalltalk Syntax
1. Character = ? Any Unicode character ?;
2. WhitespaceCharacter = ? Any space, newline or horizontal tab character ?;
3. DecimalDigit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9";
4. Letter = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M"
| "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z"
View omgmyeyes.js
function tooEarlyDate (horrible, sad) {
let lessHorrible = horrible.toLocaleTimeString();
let lessSad = new Date(sad).valueOf();
let offset = horrible.getTimezoneOffset();
//let [ no, stillno, nope, junk, newMoreGoodTime ] = new Date((offset * 60 * 1000) + lessSad).toISOString()
let newMoreGoodTime = new Date(lessSad).toISOString().replace(/^.+T/, '').replace(/\.0.+/, '');
return `at ${lessHorrible} steve said ${newMoreGoodTime} is too early to wake up`;
}
@tjwebb
tjwebb / s17-kernel-log
Created Nov 19, 2019
S17 kernel log with blinking red fault light
View s17-kernel-log
Booting Linux on physical CPU 0x0
Linux version 4.6.0-xilinx-gff8137b-dirty (lzq@armdev2) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-23) ) #25 SMP PREEMPT Fri Nov 23 15:30:52 CST 2018
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: Xilinx Zynq
cma: Reserved 16 MiB at 0x0e000000
Memory policy: Data cache writealloc
On node 0 totalpages: 61440
@tjwebb
tjwebb / va-norfolk-1
Created Jul 15, 2018
acropoly-tnm-products
View va-norfolk-1
ftp://rockyftp.cr.usgs.gov/vdelivery/Datasets/Staged/NED/LPC/projects/VA_FEMA_SouthernCities_2011/las/tiled/VA_FEMA_SouthernCities_2011_000082.zip
ftp://rockyftp.cr.usgs.gov/vdelivery/Datasets/Staged/Elevation/LPC/Projects/VA_FEMA_SouthernCities_2011/laz/VA_FEMA_SouthernCities_2011_000082.laz
ftp://rockyftp.cr.usgs.gov/vdelivery/Datasets/Staged/NED/LPC/projects/VA_FEMA_SouthernCities_2011/las/tiled/VA_FEMA_SouthernCities_2011_000079.zip
ftp://rockyftp.cr.usgs.gov/vdelivery/Datasets/Staged/Elevation/LPC/Projects/VA_FEMA_SouthernCities_2011/laz/VA_FEMA_SouthernCities_2011_000079.laz
ftp://rockyftp.cr.usgs.gov/vdelivery/Datasets/Staged/NED/LPC/projects/VA_FEMA_SouthernCities_2011/las/tiled/VA_FEMA_SouthernCities_2011_000078.zip
ftp://rockyftp.cr.usgs.gov/vdelivery/Datasets/Staged/Elevation/LPC/Projects/VA_FEMA_SouthernCities_2011/laz/VA_FEMA_SouthernCities_2011_000078.laz
ftp://rockyftp.cr.usgs.gov/vdelivery/Datasets/Staged/NED/LPC/projects/VA_FEMA_SouthernCities_2011/las/tiled/VA_FEMA_SouthernCities_2011_000072
@tjwebb
tjwebb / brew-install-qgis.sh
Created Jul 15, 2018
Install QGIS on mac from homebrew
View brew-install-qgis.sh
pip install matplotlib psycopg2 requests jinja2 pygments
brew tap osgeo/osgeo4mac
brew install qgis2
View keybase.md

Keybase proof

I hereby claim:

  • I am tjwebb on github.
  • I am tjwebb (https://keybase.io/tjwebb) on keybase.
  • I have a public key whose fingerprint is D8E1 9082 C1CF 7905 4AE6 383E F036 DF91 2D60 C856

To claim this, I am signing this object:

@tjwebb
tjwebb / csv-input
Created May 20, 2017 — forked from pdemby/csv-input
csv input
View csv-input
IDENTIFICATION DIVISION.
PROGRAM-ID. READ-CSV.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
SELECT INPUT-FILE
ASSIGN TO DISC
ORGANIZATION IS LINE SEQUENTIAL
ACCESS MODE IS SEQUENTIAL.
SELECT OUTPUT-RECORD
View sec-rss-feed.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<feed xmlns="http://www.w3.org/2005/Atom">
<author>
<email>webmaster@sec.gov</email>
<name>Webmaster</name>
</author>
<company-info>
<addresses>
<address type="mailing">
<city>DETROIT</city>
View saw
const co = require('co')
const fs = require('mz/fs')
const path = require('path')
function fixStuff (dir, fullpath = __dirname) {
return co(function *() {
const files = yield fs.readdir(path.resolve(fullpath, dir))
yield files.map(f => {
if (yield fs.stat(f).isDirectory()) {
View sharpen-saw-2017
const dir = '.' // set dir
const co = require('co')
const fs = require('mz/fs')
co(function *() {
const files = yield fs.readdir(dir)
for (const f of files) {
if (/\.csv$/.test(f)) {
yield fs.rename(f, f.replace(/\.csv$/, '.txt'))
}