Skip to content

Instantly share code, notes, and snippets.

@luce80
luce80 / dates-calcs.red
Last active November 26, 2017 08:20
Some useful functions for calculations of dates
Red [
Author: "luce80"
Licence: 'PD
]
; from https://en.wikipedia.org/wiki/Julian_day
julian-day-number: func [day month year /local a y m] [ ; in Red 0.6.2, integer calcs give integer result so we could remove to-integer(s)
; TBD check params
a: to-integer 14 - month / 12
y: year + 4800 - a
@luce80
luce80 / resize-image.red
Last active December 8, 2017 09:04
Draw Image Resizing Test with reaction
Red [
Title: "Draw Image Resizing Test"
Author: [REBOL version "Carl Sassenrath" Red port "Gregg Irwin" Reacting version "Marco Antoniazzi"]
Version: 0.0.2
File: %resize-image.red
Needs: View
]
img: load/as any [
attempt [read/binary img-url: https://pbs.twimg.com/profile_images/501701094032941056/R-a4YJ5K.png]
@luce80
luce80 / iterated-faces.red
Last active January 25, 2018 01:09
Create iterated faces in Red as those found in Rebol View
Red [
title: "Iterated faces in Red"
file: %iterated-faces.red
author: "Marco Antoniazzi"
license: "Do with this code whatever you want, giving credit to me is NOT required"
email: [luce80 AT alice DOT it]
date: 13-01-2018
version: 0.0.6
Purpose: "Create iterated faces as those found in Rebol View"
Needs: View
@luce80
luce80 / add-script.red
Created July 1, 2018 18:34
Help update red scripts collection list
Red [
title: "Update red scripts collection list"
file: %add-script.red
author: "Marco Antoniazzi"
license: "Do with this code whatever you want, giving credit to me is NOT required"
email: [luce80 AT alice DOT it]
date: 01-07-2018
version: 1.0.1
Purpose: "Help update red scripts collection list"
Needs: 'View
@luce80
luce80 / color-slider.red
Last active May 17, 2019 18:46
Red VID reactive script in 3 versions
Red [
Title: "Red VID reactive script in 3 versions"
Author: "luce80 derived from Nenad Rakocevic"
File: %color-slider.red
Needs: 'View
License: "MIT"
Notes: {
Demo of chained reactive programming, moving the sliders changes text, field, progress and the box's color
which in turn, changes the bottom text font color. Also changing field changes slider that changes all
the rest ;) .
@luce80
luce80 / scroller-test-resize.red
Last active December 12, 2022 18:58
Resizing scroller example
Red [
title: "Resizing scroller example"
author: [@toomasv @hiiamboris @gurzgri @luce80]
date: 09-10-2022
History: [
13-09-2022 "Published"
22-09-2022 "improved a bit with @toomasv idea of using face where applicable"
09-10-2022 "Add some ideas from @gurzgri"
12-12-2022 "Reacting version"
]
@luce80
luce80 / stretchy.red
Last active January 17, 2023 19:18
VID anchors for GUI resizing
Red [
title: "VID anchors for GUI resizing"
author: [@hiiamboris @luce80]
file: %stretchy.red
gist-view: https://gist.github.com/luce80/a5bb54f128934140e36c7a1073958455
date: 17-01-2023
version: 1.1.2
History: [
0.0.0 [01-01-2023 "Started"]
0.0.1 [02-01-2023 "Minimum working version"]
@luce80
luce80 / scroller-resize-enhanced.red
Last active January 6, 2024 16:21
Resizing scroller example enhanced
Red [
title: "Resizing scroller example enhanced"
author: [@toomasv @hiiamboris @luce80]
date: 19-11-2022
History: [
13-09-2022 "Published %scroller-test-resize.red"
22-09-2022 "improved a bit with @toomasv idea of using face where applicable"
24-09-2022 "Enhanced with keep alignment while resizing, add on-wheel event"
02-10-2022 "Removed useless to-float"
07-10-2022 "Workaround to avoid changing scroller/selected"
@luce80
luce80 / action-requesters.red
Last active February 25, 2024 16:59
Red action requesters (alert, confirm, etc.)
Red [
title: "Action requesters"
author: [@luce80]
file: %action-requesters.red
gist-view: https://gist.github.com/luce80/89be16a8d0a3031b41cc49795e6e20b4#file-action-requesters-red
date: 25-02-2024
version: 0.7.4
History: [
0.0.0 [23-12-2022 "Started"]
0.7.0 [28-12-2022 "Ok"]
@luce80
luce80 / mold-red.red
Last active March 23, 2024 18:53
Mold the System object
Red [Needs: 'View]
system/script/header: make system/standard/header [ ;@@ workaround for #4992
;system/script/title: ;@@ workaround for #4992 (to be used only in "main" script)
title: "Mold the System object"
author: "Marco Antoniazzi"
History: [
0.1.0 [18-08-2013 "Done"]
0.2.0 [16-04-2016 "Fixed unset values"]
0.3.0 [23-08-2018 "Added 3 dots ..."]
0.4.0 [26-08-2018 "Added checks actions"]