Skip to content

Instantly share code, notes, and snippets.

@lepinekong
lepinekong / table.to.block.red
Last active January 8, 2018 23:59
table.to.block
table: {Bitcoin | BTC | Digital gold
Ethereum | ETH | Programmable contracts and money
Bitcoin Cash | BCH | Bitcoin clone
Ripple | XRP | Enterprise payment settlement network
Litecoin | LTC | Faster Bitcoin
Dash | DASH | Privacy-focused Bitcoin clone
NEO | NEO | Chinese-market Ethereum
NEM | XEM | Batteries-included digital assets
Monero | XMR | Private digital cash
Ethereum Classic| ETC | Ethereum clone
@lepinekong
lepinekong / vid.spreadsheet.red
Created January 9, 2018 00:06
VID.Spreadsheet
Red [
Title: "Tiny VID Spreadsheet"
Author: ["Gregg Irwin" "based on Nenad's Native PicoSheet"]
Needs: View
]
sheet-size: 8x8
cell-size: 100x24
L: charset "ABCDEFGHIabcdefghi"
@lepinekong
lepinekong / dsl.model.simulation
Last active March 9, 2018 15:14
DSL Draft for Modelisation and Simulation
Red [
Title: "DSL for Modelisation and Simulation of Business Entities"
]
Simulate Bank: Model [
Companies: [[Company]] ; companies is a collection of company which are potential clients of the bank
Company: [name Address (optional)]
Employees: [[Employee]] ; employees is a collection of employee
ThirdParties: [[ThirdParty]] ; thirdParties is a collection of thirdParty
ThirdParty: [
@lepinekong
lepinekong / chartmage.latest
Last active April 27, 2018 22:24
flexible seach function in red
((Search)) - searchString /in 'path /ext 'extension ->> searchString: form searchString
subgraph Init
searchString: form searchString
searchString: form searchString ->> ext?
subgraph extension
ext? - Yes ->> extension: form extension
extension: form extension ->> extension: to-file extension
ext? - No ->> extension: %.md
end
extension: %.md ->> root: any [path %./]
@lepinekong
lepinekong / .system.override.red
Created March 13, 2018 15:44
.system.override.red
Red [
Title: ".system.override.red"
]
if not value? 'syscd [
syscd: :cd
cd: func [
"Change directory (shell shortcut function)."
[catch]
'path [file! word! path! unset! string! paren! url!] "Accepts %file, :variables and just words (as dirs)"
@lepinekong
lepinekong / .code.analyze.red
Created March 13, 2018 18:51
.code.analyze
Red [
Title: ".code.analyze"
]
src: {Red [
Title: ".system.override.red"
]
if not value? 'syscd [
syscd: :cd
@lepinekong
lepinekong / .system.override
Created March 14, 2018 11:09
.system.override
.system.override: function['.func-name][
Context [
func-name: form .func-name
func-src: get :.func-name
spec: mold/only spec-of :func-src
template: {if not value? 'sys<%func-name%> [
sys<%func-name%>: :<%func-name%>
<%func-name%>: function [<%spec%>][
@lepinekong
lepinekong / red.scheme
Created March 15, 2018 23:24
red.scheme
<?xml version="1.0" encoding="UTF-8"?>
<Scheme>
<keyword-classes>
<keyword-class name="red.keywords">
about abs absolute add alert alias all alter and any any-block? any-function? any-string? any-type? any-word? append arccosine arcsine arctangent array as-pair ask at attempt back binary? bind bitset? block? break brightness? browse build-tag caret-to-offset catch center-face change change-dir char? charset checksum choose clean-path clear clear-fields close comment complement component? compose compress confirm connected? construct context copy cosine datatype? date? debase decimal? decode-cgi decompress dehex delete detab difference dir? dirize disarm dispatch divide do do-events does dump-face dump-obj echo either else email? empty? enbase entab equal? error? even? event? exclude exists? exit exp extract fifth file? find first flash focus for forall foreach forever form forskip found? fourth free func function function? get get-modes get-word? greater-or-equal? greater? halt has hash? head head? help h
@lepinekong
lepinekong / .system.user.apps.countdown.red
Last active April 4, 2018 07:44
Opensource Countdown Timer / Pomodoro (with Voice Alarm for Windows, to adapt for MacOS and Linux)
Comment {
Redlang: https://red-lang.org
Tutorials: [
https://dev.to/lepinekong/red-for-hopeless-programmers---part-i-3g0
https://dev.to/lepinekong/red-for-hopeless-programmers---part-ii-258
]
Demo-Instruction: {
- Script below Red[] can be pasted directly in Redlang Console (1 Mb download https://www.red-lang.org/p/download.html)
- if you just want to see demo without downloading, type in Red console:
Tutorials: [
https://dev.to/lepinekong/red-for-hopeless-programmers---part-i-3g0
https://dev.to/lepinekong/red-for-hopeless-programmers---part-ii-258
]
Demo-Instruction: {
can be pasted directly in Redlang Console (1 Mb download https://www.red-lang.org/p/download.html)
if you just want to see demo without downloading, type in Red console:
do read https://gist.githubusercontent.com/lepinekong/08021f2b8ecdd3e0dc09685ef0b0c03f/raw/c7b41adc9a3815f77c4bca815af35b598f920bc1/.system.user.apps.countdown.red
Countdown 00:25:00 Pomodoro