Skip to content

Instantly share code, notes, and snippets.

Nenad Rakocevic dockimbel

Block or report user

Report or block dockimbel

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
@dockimbel
dockimbel / rloc.red
Last active Jan 11, 2019
Lines of code statistics from Red files
View rloc.red
Red [
Title: "Lines of code statistics from Red files"
Author: "Nenad Rakocevic"
File: %rloc.reds
Tabs: 4
Purpose: {
Counts the number of files, lines of code and inline comments in Red/Rebol files, across folders,
filtering files using a list of suffixes and excluding files from a given list of subfolders.
}
]
@dockimbel
dockimbel / check-brackets.red
Last active Jan 4, 2019
PoC script for checking if brackets/parens are matching in a Red file
View check-brackets.red
Red [
Purpose: "PoC script for checking if brackets/parens are matching in a Red file"
]
check-brackets: function [file [file!]][
line: 1
stack: clear []
skip-chars: complement charset "[]()^/"
parse read file [
View Verifying my Peepeth
Verifying my identity on Peepeth.com 0x1e33e78b9fc22c63740b0ed0cd441acbac5109f2
@dockimbel
dockimbel / get-arguments.red
Last active Oct 4, 2018
Extracting current stack frame values using R/S.
View get-arguments.red
Red []
get-arguments: routine [
/local
list [red-block!]
s [red-value!]
t [red-value!]
top
][
top: stack/ctop - 3 ;-- might need adjustments depending on interpreted vs compiled code.
@dockimbel
dockimbel / draw-text-area.red
Created May 18, 2018
Mixes drawing with text in area widget
View draw-text-area.red
Red [
Note: "from: https://gitter.im/red/red/gui-branch?at=5afc55a05a1d895fae45588e"
]
view [
area 200x100 focus wrap
at 10x10 base 255.255.255.254 200x100 all-over
draw [line-width 20 pen 200.50.50.200]
on-down [repend face/draw ['line event/offset event/offset]]
on-over [if event/down? [change back tail face/draw event/offset]]
@dockimbel
dockimbel / int256.red
Last active Apr 11, 2018
256-bit unsigned integer library
View int256.red
Red [
Title: "256-bit unsigned integer library"
Author: "Nenad Rakocevic"
File: %int256.red
Tabs: 4
Rights: "Copyright (C) 2018 Red Foundation. All rights reserved."
License: {
Distributed under the Boost Software License, Version 1.0.
See https://github.com/red/red/blob/master/BSL-License.txt
}
@dockimbel
dockimbel / tiger.red
Last active Apr 3, 2018
SVG Tiger's vector data in Draw dialect
View tiger.red
Red [
Purpose: "Tiger vector data in Draw dialect (from SVG)"
File: %tiger.red
Author: "Zamlox"
Tabs: 4
Rights: "Copyright (C) 2013-2017 Nenad Rakocevic. All rights reserved."
License: {
Distributed under the Boost Software License, Version 1.0.
See https://github.com/red/red/blob/master/BSL-License.txt
}
@dockimbel
dockimbel / eval2.red
Created Apr 3, 2018
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 pomodoro.red
Red [
Purpose: "Implements a Pomodoro timer"
Note: "Original code from https://gitter.im/red/red/gui-branch?at=5ab95dae2b9dfdbc3a25636a"
]
Pomodoro: does [
context [
t: diff: b1: b2: end: none
view/no-wait [
title "Pomodoro"
@dockimbel
dockimbel / walk-files.red
Created Mar 21, 2018
Red source files header updater
View walk-files.red
Red []
dive: function [path action [block!] filter [block!]][
bind action 'path
if filter [bind filter 'path]
foreach file read path [
if dir? file [dive append copy path file action filter]
if any [not filter do filter][do action]
]
You can’t perform that action at this time.