Skip to content

Instantly share code, notes, and snippets.

@gchiu
gchiu / check-rebols.reb
Last active January 26, 2020 00:39
take2 on checking for rebol binaries
rebol []
platforms: [0.13.2 0.3.1 0.3.40 0.2.40 0.4.4 0.4.40]
windows: [0.3.1 0.3.40]
descriptions: ["" "-debug" "-debug-cpp"]
nl: if system/version = 2.102.0.16.2 [
info?: :js-head
func [][replpad-write/html "<hr>"]
] else [func [][print "........................................."]]
@gchiu
gchiu / check-rebols.reb
Last active January 25, 2020 23:50
check for r3
rebol []
platforms: [0.13.2 0.3.1 0.3.40 0.2.40 0.4.4 0.4.40]
windows: [0.3.1 0.3.40]
if system/version = 2.102.0.16.2 [
info?: :js-head
]
base: http://metaeducation.s3.amazonaws.com/travis-builds/
@gchiu
gchiu / crc16.r3
Last active May 13, 2018 22:41
crc16 in renc
Rebol [
file: %calcCRC16.r3
notes: {based on https://blog.naver.com/pinggusoft/221258891786}
date: 13-May-2018
]
INIT_SEED16: #{3692}
TBL_CRC16: [
0 4489 8978 12955 17956 22445 25910 29887 35912 40385 44890 48851 51820 56293 59774 63735
@gchiu
gchiu / crc8.r3
Last active May 13, 2018 02:39
crc8
Rebol [
file: %crc8.r3
notes: {based on https://blog.naver.com/pinggusoft/221258891786}
date: 13-May-2018
author: "Graham"
]
INIT_SEED8: #{77}
crc8-table: [
#{00} #{5E} #{BC} #{E2} #{61} #{3F} #{DD} #{83} #{C2} #{9C} #{7E} #{20} #{A3} #{FD} #{1F} #{41}
@gchiu
gchiu / tello-client.reb
Created April 28, 2018 01:04
tello client in ren-c
Rebol [
date: 28-April-2018
title: "simple tello client"
author: "Graham"
]
attempt [close tello]
okbin: to binary! {OK}
commands: copy [2 "speed?" 2 "takeoff" 10 "land" 1 "quit"]
@gchiu
gchiu / drone-gui.reb
Created April 12, 2018 06:54
Drone GUI server
Rebol [
date: 12-April-2018
title: "simple GUI drone test"
]
attempt [close listen]
print "opening server on port 9000"
listen: open udp://:9000
@gchiu
gchiu / udp-server.reb
Created April 11, 2018 00:57
simple UDP server
Rebol [
date: 11-April-2018
title: "simple udp server"
]
attempt [close listen]
print "opening server on port 9000"
listen: open udp://:9000
@gchiu
gchiu / tcp-server.reb
Created April 10, 2018 18:37
simple tcp server doesn't work with udp
Rebol [
date: 11-April-2018
title: "simple tcp server"
]
attempt [close listen]
print "opening server on port 9000"
listen: open tcp://:9000
@gchiu
gchiu / require-commit.reb
Last active July 29, 2017 00:32
require commit
rebol [
commit: [
id: "8f0b227bd6a93a8a8105ab5de5cdc0e6ec103034"
date: 29-July-2017 ; only include if you want to fail older builds
]
]
require-commit: procedure [
"checks current commit against required commit"
{<form class="layout_primary" id="login_form" action="/identity/users/sign_in?client_id=1id3ui9jj7224ycc1wkn008uw6vsxdo&amp;redirect_uri=https%3A%2F%2Fmyflick.flickelectric.co.nz%2Fauth%2Fflick_connect%2Fcallback&amp;response_type=code&amp;scope=openid+email+profile&amp;state=5da93efe112b868300b686bf7d60d297935b8255fd3199f7" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="H0/4fCOJ+7DAw/cpkSi+lZQgQxEaJSBh2BTZX1JSzyfRAcUchSsFnMTzbO1tQdlsqeYUG69AeeI9ybtukkwJHg==" />
<input type="hidden" name="response_type" value="code">
<input type="hidden" name="client_id" value="1id3ui9jj7224ycc1wkn008uw6vsxdo">
<input type="hidden" name="redirect_uri" value="https://myflick.flickelectric.co.nz/auth/flick_connect/callback">
<input type="hidden" name="scope" value="openid email profile">
<input type="hidden" name="state" value="5da93efe112b868300b686bf7d60d297935b8255fd3199f7">