Skip to content

Instantly share code, notes, and snippets.

View rgchris's full-sized avatar

Christopher Ross-Gill rgchris

View GitHub Profile
#!/usr/local/bin/ren-c
Rebol [
Title: "Minimal HTTPD 404 Server"
Date: 17-Mar-2017
]
sys/make-scheme [
title: "Minimal 404 Server"
name: 'httpd
Rebol [
Title: "XML Parser/Object Model for Rebol 3"
Author: "Christopher Ross-Gill"
Date: 22-Oct-2009
Home: http://www.ross-gill.com/page/XML_and_REBOL
File: %xml.reb
Version: 0.5.0
Purpose: "XML handler for Rebol v3"
Rights: http://opensource.org/licenses/Apache-2.0
Type: module
@rgchris
rgchris / cgi-concept.reb
Created May 21, 2017 20:10
Possible implementation of CGI with Ren-C HTTPD module.
#!/usr/local/bin/ren-c
Rebol [
Title: "CGI Tester"
Date: 21-May-2017
Author: "Christopher Ross-Gill"
]
import <httpd>
@rgchris
rgchris / altjson-renc.reb
Last active May 26, 2017 17:46
AltJSON and HTTPD adapted for Ren-C
Rebol [
Title: "JSON Parser for Rebol 3"
Author: "Christopher Ross-Gill"
Date: 18-Sep-2015
Home: http://www.ross-gill.com/page/JSON_and_Rebol
File: %altjson.r
Version: 0.3.6.1
Purpose: "Convert a Rebol block to a JSON string"
Rights: http://opensource.org/licenses/Apache-2.0
; Type: 'module
@rgchris
rgchris / screen-independence.r
Created June 26, 2017 14:40
Screen independent sizing in Rebol/View 2.7.8
Rebol [
Title: "Screen Independent"
Date: 26-Jun-2017
Author: "Mennohexo"
]
probe base-size: system/view/screen-face/size / 2
vs: use [base][ ; VS named after VW/VH CSS convention
probe base: reduce [base-size/x / 100 base-size/y / 100]
#!/usr/local/bin/ren-c
Rebol [
Title: "Fetch Commits"
Date: 19-May-2017
Index: http://metaeducation.s3.amazonaws.com
]
; import <xml>
import https://raw.githubusercontent.com/rgchris/Scripts/master/experimental/altxml.reb
@rgchris
rgchris / parse-fsm.red
Last active July 21, 2017 22:05
Contrived Parse-based FSM
#!/usr/local/bin/red
Red [
Title: "Contrived FSM Example"
Date: 21-Jul-2017
Author: "Christopher Ross-Gill"
]
state: mark: none
@rgchris
rgchris / similarity-of.red
Last active August 25, 2017 05:38
Calculate the similarity of two strings
Red [
Title: "Similarity Of"
Author: "Christopher Ross-Gill"
Date: 25-Aug-2017
File: %similarity-of.red
Purpose: "Calculate the similarity (%) of two strings."
Rights: http://opensource.org/licenses/Apache-2.0
]
do %simplediff.red
@rgchris
rgchris / logos.red
Last active September 7, 2017 15:48
Alternate renderings of the Red logo.
#!/usr/local/bin/red
Red [
Title: "Red Logos Example"
Date: 7-Sep-2017
Author: "Christopher Ross-Gill"
File: %logos.red
]
view [
@rgchris
rgchris / html-entities-test.reb
Created September 11, 2017 04:46
Testing HTML Entity Parsing
#!/usr/local/bin/ren-c
Rebol []
do %html-entities.reb
test-strings: [
{FOO&gt;BAR} ["gt;" "62"]
{FOO&gtBAR} ["gt" "62"]
{FOO&gt BAR} ["gt" "62"]