Skip to content

Instantly share code, notes, and snippets.

Christopher Ross-Gill rgchris

View GitHub Profile
@rgchris
rgchris / minimal-epub.reb
Last active Feb 6, 2019
Build a minimal EPUB in Ren-C
View minimal-epub.reb
#!/usr/local/bin/ren-c-latest
Rebol [
Title: "Package a Minimal eBook"
Date: 5-Feb-2019
Author: "Christopher Ross-Gill"
Rights: http://opensource.org/licenses/Apache-2.0
Notes: [
https://ebooks.stackexchange.com/a/1184
{Source of Minimal eBook}
@rgchris
rgchris / deep-list.reb
Last active Feb 5, 2019
Return a list of a folder's content (recursive)
View deep-list.reb
Rebol [
Title: "Return a listing of a folder's content"
Date: 4-Feb-2019
Author: "Christopher Ross-Gill"
Rights: http://opensource.org/licenses/Apache-2.0
]
deep-list: func [
source [file!]
/hidden /folders
@rgchris
rgchris / svg-experiments.red
Last active Jan 26, 2019
Some SVG functions in Red
View svg-experiments.red
#!/usr/local/bin/red
Red [
Title: "Parse SVG"
Date: 23-Dec-2018
Author: "Christopher Ross-Gill"
Rights: http://opensource.org/licenses/Apache-2.0
]
; do %altxml.red
@rgchris
rgchris / events.r
Created Jan 26, 2019
Experiments with Rebol/View 2.7.8
View events.r
#!/usr/local/bin/rebview -iqvs
Rebol [
Title: "Events Test"
Date: 12-Dec-2018
Author: "Christopher Ross-Gill"
File: %events.r
Version: 0.1.0
Comments: {
- Linkify Face (http://www.ross-gill.com/page/Beyond_Regular_Expressions)
@rgchris
rgchris / right-align.red
Last active Jan 23, 2019
Right-align some TSPANs using Red's SIZE-TEXT to measure each line
View right-align.red
#!/usr/local/bin/red
Red [
Title: "Right Aligned Text"
Date: 23-Jan-2019
Author: "Christopher Ross-Gill"
]
font-weight: 'bold
font-size: 30
@rgchris
rgchris / libred.test.r
Last active Dec 28, 2018
Attempt to CALL libRed from Rebol 2
View libred.test.r
#!/usr/local/bin/rebview -iqvs
Rebol [
Title: "libRed Test"
Author: "Christopher Ross-Gill"
Date: 19-Dec-2018
]
libred: make object! [
library: load/library %libRed.dylib
@rgchris
rgchris / json-server.r
Created Dec 19, 2018
Small JSON server for Rebol 2
View json-server.r
Rebol [
Title: "JSON Server"
Date: 19-Dec-2018
Author: "Christopher Ross-Gill"
]
do http://reb4.me/r/altjson
do http://reb4.me/r/httpd
data: [ ; in lieu of CSV data, from Rebol in Ten Steps
@rgchris
rgchris / linkify-face.r
Last active Dec 18, 2018
Add links to text face for Rebol 2
View linkify-face.r
Rebol [
Title: "Link Up"
File: %linkify-face.r
Version: 0.0.1
Home: http://www.ross-gill.com/page/Beyond_Regular_Expressions
Date: 8-Aug-2010
Purpose: "To identify URIs in face/text and overlay with links"
Author: "Christopher Ross-Gill"
]
@rgchris
rgchris / gravatar.r
Last active Dec 20, 2018
Gravatar Lookup for Rebol and Red
View gravatar.r
Rebol [
Title: "Get Gravatar"
File: %gravatar.r
Date: 27-Nov-2012
Purpose: "Generate Gravatar Profile Image URLs"
]
gravatar: use [to-md5][
to-md5: func [val [any-string!]][
lowercase enbase/base checksum/method to binary! lowercase trim form val 'md5 16
@rgchris
rgchris / scroll.test.r
Last active Dec 18, 2018
Sample handler for Scroll Events in Rebol 2
View scroll.test.r
Rebol [
Title: "Detect Scroller"
Date: 17-Dec-2018
Author: "Christopher Ross-Gill"
]
scroll-handler: make object! [
; SCROLL-* events use OFFSET to determine the direction and amount of
; scrolling to be considered, therefore to ascertain the offset, one needs
; to track the position of the pointer.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.