Skip to content

Instantly share code, notes, and snippets.

iArnold iArnold

  • Freelance ICT Specialist
  • Netherlands
Block or report user

Report or block iArnold

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@iArnold
iArnold / eval2.red
Last active Apr 11, 2018 — forked from dockimbel/eval2.red
Test script for Red/View Android backend
View eval2.red
Red [
Title: "Red Android bridge demo"
Author: "Nenad Rakocevic"
File: %eval2.red
Config: [type: 'dll libRed?: no libRedRT?: yes export-ABI: 'cdecl]
Tabs: 4
Needs: 'View
Rights: "Copyright (C) 2013-2017 Nenad Rakocevic. All rights reserved."
License: {
Distributed under the Boost Software License, Version 1.0.
View l-system.red
Red [
Author: "Toomas Vooglaid"
Date: 25-9-2017
Description: {Experiments with L-System}
]
ctx: context [
scale: origin: length: len: angle: width: delta-width: times-length: delta-length: delta-angle: aliasing?: stack: commands: none
defaults: [
scale 2.0
origin 300x500
View set-iso-week.red
Red []
set-iso-week: function [
"Returning a new date set on the first day of that week for a given date and weeknumber"
date [date!]
/week weeknumber [integer!]
/local resultdate ordinal jan4 dec31 daysinyear daysinlastyear
][
jan4: dec31: resultdate: now/date
jan4/day: 4
jan4/month: 1
View gist:2ef23f8d16c002c96934a1c8015e4ec6
; https://repl.it/languages/scheme
(define (abs x)
(cond ((> x 0) x)
((= x 0) 0)
((< x 0) (- x))))
(define (average x y)
(/ (+ x y) 2))
@iArnold
iArnold / get-date
Created May 9, 2017
Red date retrieve
View get-date
get-date: function [
"Get date from unixtimestamp.com"
return: [string!]
/local
page
datestring [string!]
datearray
][
page: read http://www.unixtimestamp.com/index.php
get-today-rule: [ thru {seconds since Jan 01 1970. (UTC)} thru {<h3 class="text-danger">} copy datestring to " @ " to end]
@iArnold
iArnold / dir-tree.red
Created May 8, 2017 — forked from toomasv/dir-tree.red
Print a directory tree
View dir-tree.red
Red [
Author: "Toomas Vooglaid"
Date: "2017-05-07"
Changed: "2017-05-08"
Purpose: "Print a directory tree"
File: "%dir-tree.red"
]
context [
; Some helpers
get-char: func [hex][to-char to-integer hex]
View csv-tools.red
Red [
Title: "CSV Handling Tools"
Author: "Brian Hawley"
File: %csv-tools.red
Date: "20-Mar-2017"
Version: 1.2.0
Purpose: "Loads and formats CSV data, for enterprise or mezzanine use."
Library: [
level: 'intermediate
platform: 'all
View %grep.red
Red [
Title: "Partial grep implementation"
Purpose: {To search the input for lines containing a match
to the given pattern, specified as a regular expression}
Author: "Rudolf W. MEIJER"
File: %grep.red
Version: 0.4.0
Date: "24-Nov-2016"
Rights: "(c) Copyright 2016 Rudolf W. MEIJER"
History: [
@iArnold
iArnold / maskinput
Last active Nov 4, 2016
Masked input
View maskinput
Red [
filename: %maskinput.red
date: "4-Nov-2016"
Needs: 'View
]
star-replace: func [
num
/local stars
][
@iArnold
iArnold / tabtest.red
Created Oct 18, 2016
How to go about adding tab functionality?
View tabtest.red
;do %/c/../tabtest.red ;-- Everything before the Red header is not a comment!!
Red [
file: %tabtest.red
]
window-actors: object [ ;-- actors for the window
on-key: func [face [object!] event [event!]][
case [
event/key = #"^-" [
print "TAB key caught by window face!"
You can’t perform that action at this time.