Skip to content

Instantly share code, notes, and snippets.

View rgchris's full-sized avatar

Christopher Ross-Gill rgchris

View GitHub Profile
@rgchris
rgchris / resizing.adoc
Last active December 18, 2015 06:08
Sample MakeDocPro to AsciiDoc #2

Resizing for R3 GUI framework

Purpose

The purpose of this document is to describe the R3 GUI resizing subsystem.

Overview

Rebol [
Title: "Add a Site"
Type: 'controller
File: %app/controllers/addsite.r
]
route () to submit [ ; where submit is %app/views/addsite/submit.html.rsp
get [] ; shows the form
put [
@rgchris
rgchris / sqlite-version.reb
Last active January 11, 2016 03:19
Obtain SQLite version with Rebol 3
#!/usr/local/bin/ren-c
Rebol [
Title: "SQLite Init"
Date: 10-Jan-2016
Author: "Christopher Ross-Gill"
Comment: [
"Ren/C branch build with LibFFI"
http://stackoverflow.com/a/34710721/292969
]
@rgchris
rgchris / shttpd.reb
Last active August 3, 2016 18:21
Rebol (Ren/C) HTTPD Server Scheme
#!/usr/local/bin/ren-c
Rebol [
Title: "A tiny static HTTP server"
Author: ["abolka" "Giulio Lunati"]
Date: [2009-11-04 2016-07-25]
; name: shttpd
; type: module
; exports: [shttpd]
]
@rgchris
rgchris / ping.reb
Last active January 5, 2017 22:05
Port example: Send block to Server, Responds with reversed block.
#!/usr/local/bin/ren-c
Rebol [
Title: "Ping Scheme"
Date: 5-Jan-2017
Author: "Christopher Ross-Gill"
Home: https://github.com/revault/rebol-wiki/wiki/Port-Examples#tcp-ping-pong-messages
]
sys/make-scheme [
@rgchris
rgchris / int-to-bin.reb
Created January 25, 2017 04:59
Convert an Integer to Binary
Rebol [
Title: "Integer to Binary"
Date: 24-Jan-2017
]
method-1: func [
int [integer!]
][
debase/base to-hex int 16
]
#!/usr/local/bin/rebol -cs
Rebol [
Title: "HTTPD Scheme"
Date: 10-Jun-2013
Author: [
"Christopher Ross-Gill" 4-Jan-2017 "Adaptation to Scheme"
"Andreas Bolka" 4-Nov-2009 "A Tiny HTTP Server"
]
File: %httpd.reb
@rgchris
rgchris / light-control.reb
Last active February 1, 2017 04:39
Early Pass at HTTP Driven API to Send Commands to a UDP Server
#!/usr/local/bin/ren-c
Rebol [
Title: "Turn Lights On and Off"
Date: 31-Jan-2017
Author: "Christopher Ross-Gill"
File: %light-control.reb
Version: 0.1.0
Rights: http://opensource.org/licenses/Apache-2.0
]
@rgchris
rgchris / rgc_shortcodes.php
Last active February 4, 2017 01:07
WordPress Plugin: adds shortcodes to assist in incorporating features of Bootstrap including elementary grid handling.
<?php
/**
* @package Shortcodes for Bootstrap: Grid, Misc
* @version 0.6
*/
/*
Plugin Name: Shortcodes for Bootstrap: Grid, Misc
Plugin URI: https://gist.github.com/rgchris/b473a165b6c44275b6b8a2e693e9deca
Description: Adds shortcodes to assist in incorporating features of Bootstrap including elementary grid handling.
Author: Christopher Ross-Gill
@rgchris
rgchris / get-object.reb
Last active February 11, 2017 21:30
Get Object
#!/usr/local/bin/rebol -cs
Rebol [
Title: "Get Object"
Author: "Christopher Ross-Gill"
]
do %httpd.r
do %altjson.r