View my-ip.r3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rebol [] | |
my-ip?: function[ | |
"Resolves external IP address" | |
][ | |
quiet: system/options/quiet | |
system/options/quiet: true | |
host-name: read dns:// | |
local-ip: read join dns:// host-name | |
external-ip: read http://ifconfig.me/ip | |
system/options/quiet: quiet |
View TLS-Chacha20-Poly1305-simulation.r3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rebol [ | |
title: "TLS with ChaCha20-Poly1305 use-case simulation" | |
needs: 3.8.0 | |
] | |
print "--------------------------------------------------" | |
print "- TLS with ChaCha20-Poly1305 use-case simulation -" | |
print "--------------------------------------------------" | |
View timelaps-anim.reb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rebol [ | |
purpose: {notes how to make timelaps animation} | |
] | |
;- OpenCV's stitching_detailed.exe to prepare timelaps images | |
cmd {stitching_detailed --try_cuda yes --warp transverseMercator --timelapse crop 01.jpg 02.jpg} | |
;- https://developers.google.com/speed/webp/download | |
cmd {img2webp -lossy -d 300 fixed_01.jpg fixed_02.jpg -o out.webp} |
View enlist.r3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rebol [ | |
name: enlist | |
purpose: "Format series to human readable list" | |
usage: [ | |
print enlist [] ;= none | |
print enlist [1] ;= just 1 | |
print enlist [1 2] ;= 1 and 2 | |
print enlist [1 2 3] ;= 1, 2 and 3 | |
] | |
note: https://gitter.im/red/help?at=5f9c02f906fa0513dd8119d1 |
View png-size.r3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rebol [ | |
name: png-size | |
needs: 3.2.0 | |
usage: [ | |
png-size http://avatars-04.gitter.im/gh/uv/4/oldes | |
] | |
] | |
png-size: func[ | |
"Read PNG size from raw binary data" |
View wait-for-key.r3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rebol [ | |
name: wait-for-key | |
title: "Simple Rebol `wait-for-key` function" | |
purpose: "Demonstrate how to get simple user keyboard input from console without need to press ENTER" | |
author: "Oldes" | |
date: 7-Jun-2020 | |
needs: 3.1.1 ; https://github.com/Oldes/Rebol3 | |
note: "So far works only on Windows!" | |
usage: [ | |
print "Press any key!" |
View graphql-requests.reb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rebol [] | |
last-20-closed-issues: { | |
query($owner:String!,$repo:String!) { | |
repository(owner:$owner, name:$repo) { | |
issues(last:20, states:CLOSED) { | |
edges { | |
node { | |
title | |
url |
View github.r3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rebol [ | |
title: "Github API" | |
author: "Oldes" | |
license: MIT | |
] | |
My-GitHub-authorization: "token ..." ;<--- replace ... with your API token! | |
github: context [ | |
api.github: https://api.github.com/ |
View html-entities.red
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
Title: "HTML entities" | |
Purpose: "To decode HTML entities in a text" | |
Author: "Oldes" | |
Date: 12-May-2020 | |
Version: 1.0.2 | |
License: MIT | |
Usage: [ | |
"Test: ♠ & ¢ <a> and Δδ ¾" = | |
decode-html-entities {Test: ♠ & ¢ <a> and Δδ ¾} |
View func-spec.r3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rebol [ | |
note: {There are some hacks in this, based on empirical testing.} | |
] | |
func-spec-ctx: context [ | |
func-spec: context [ | |
desc: none | |
attr: none | |
params: copy [] | |
refinements: copy [] |
NewerOlder