-
Notifications
You must be signed in to change notification settings - Fork 7
/
functions.txt.tmpl
80 lines (78 loc) · 5.51 KB
/
functions.txt.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
line {{next}} started = {{started}}
line {{next}} debugging = {{debug_toggle}}
line {{next}} debugging = {{if debugging}}debugging{{end}}
line {{next}} debug_toggle = {{debug_toggle}}
line {{next}} debugging = {{if debugging}}debugging{{end}}
line {{next}} debug = {{debug "message"}}
line {{next}} command_line = {{command_line}}
line {{next}} RENDERIZER_VERSION = {{environment "RENDERIZER_VERSION" | dirname}}
line {{next}} ip_math = {{ip_math "[-1].[+2].[-3].[+1,%10]" "193.166.3.39"}}
line {{next}} ip4_inc = {{ip4_inc 2 -3 "192.168.3.0"}}
line {{next}} ip4_next = {{ip4_next 2 0 4 "192.168.3.0"}}
line {{next}} ip4_prev = {{ip4_prev 2 1 4 "192.168.1.0"}}
line {{next}} ip_ints = {{ip_ints "192.168.1.0" | ip4_add 2 0 4 3}}
line {{next}} ip_ints = {{ip_ints "192.168.1.0" | ip4_add 2 0 4 3 | ip4_join}}
line {{next}} TODO = {{ip6_inc 2 1 "1111:2222:3333:4444:5555:6666:7777:8888"}}
line {{next}} TODO = {{ip6_next 2 0 4 "1111:2222:3333:4444:5555:6666:7777:8888"}}
line {{next}} TODO = {{ip6_prev 2 0 4 "1111:2222:3333:4444:5555:6666:7777:8888"}}
line {{next}} TODO = {{ip_ints "1111:2222:3333:4444:5555:6666:7777:8888" | ip6_add 2 0 4 3}}
line {{next}} TODO = {{ip_ints "1111:2222:3333:4444:5555:6666:7777:8888" | ip6_join }}
line {{next}} TODO = { {cidr_next} }
line {{next}} ip_ints = {{ip_ints "192.168.0.0"}}
line {{next}} ip_split = {{ip_split "1111:2222:3333:4444:5555:6666:7777:8888"}}
line {{next}} ip_split = {{ip_split "1111:2222:3333:4444:5555:6666:7777:8888" | to_int 16 }}
line {{next}} ip_split = {{ip_split "192.168.0.0" | dec_to_int}}
line {{next}} ip_split = {{ip_split "1111:2222:3333:4444:5555:6666:7777:8888" | hex_to_int}}
line {{next}} ip_split = {{ip_split "1111:2222:3333:4444:5555:6666:7777:8888" | hex_to_int | from_int "%04x" | join "."}}
line {{next}} ip_split = {{ip_split "192.168.0.0" | dec_to_int | from_int "%d" | join "."}}
line {{next}} ip_split = {{ip_split "1111:2222:3333:4444:5555:6666:7777:8888" | iindex 1}}
line {{next}} ip_split = {{ip_split "1111:2222:3333:4444:5555:6666:7777:8888" | hex_to_int | iindex 1}}
line {{next}} iindex = {{"1111:2222:3333:4444:5555:6666:7777:8888" | iindex 4}}
line {{next}} split = {{split "0" "1111:2222:3333:4444:5555:6666:7777:8888"}}
line {{next}} substr = {{substr 4 10 "1111:2222:3333:4444:5555:6666:7777:8888"}}
line {{next}} replace = {{replace "1111:2222:3333:4444:5555:6666:7777:8888" ":" " " 3}}
line {{next}} replace_ = {{"1111:2222:3333:4444:5555:6666:7777:8888" | replace_ 3 ":" " "}}
line {{next}} trim = {{trim "abctrimmedxyz" "abcxyz"}}
line {{next}} trim_ = {{"abctrimmedxyz" | trim_ "abcxyz"}}
line {{next}} trim_left = {{trim_left "abctrimmedxyz" "abcxyz"}}
line {{next}} trim_left_ = {{"abctrimmedxyz" | trim_left_ "abcxyz"}}
line {{next}} trim_right = {{trim_right "abctrimmedxyz" "abcxyz"}}
line {{next}} trim_right_ = {{"abctrimmedxyz" | trim_right_ "abcxyz"}}
line {{next}} keynext A = {{keynext "A"}}
line {{next}} keynext B = {{keynext "B"}}
line {{next}} keynext A = {{keynext "A"}}
line {{next}} inc = 1 + 5 + 4 = {{4 | inc 1 5}}
line {{next}} add = 7 + 3 = {{add 3 7}}
line {{next}} sub = 13 - 3 = {{sub 3 13}}
line {{next}} mul = 5 * 2 = {{mul 2 5}}
line {{next}} div = 20 / 2 = {{div 2 20}}
line {{next}} mod = 12345 % 10 = {{mod 10 12345}}
line {{next}} rand = {{rand}}
line {{next}} lower = {{lower "LOWER"}}
line {{next}} upper = {{upper "upper"}}
line {{next}} title = {{title "this is a title from lowercase"}}
line {{next}} title = {{title "THIS IS A TITLE FROM UPPERCASE"}}
line {{next}} initcap = {{initcap "this is initcap from lowercase"}}
line {{next}} initcap = {{initcap "THIS IS INITCAP FROM UPPERCASE"}}
line {{next}} cleanser = {{cleanser "[^works]" "abcdefghijklmnopqrstuvwxyz"}}
line {{next}} cleanse = [{{cleanse " abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ "}}]
line {{next}} cleanse = {{cleanse "WOR1234567890KS"}}
line {{next}} cleanse = {{cleanse "WOR!@#$%^&*()KS"}}
line {{next}} cleanse = {{cleanse "WOR`~-=_+[]{};':\",.<>/?KS"}}
line {{next}} cleanse = {{cleanse "zaq!xsw@cde#vfr$bgt%nhy^mju&,ki*.lo(/;p)"}}
line {{next}} dirname = {{dirname "a/b/c/d"}}
line {{next}} dirname = {{dirname "/a/b/c/d"}}
line {{next}} dirname = {{dirname "d"}}
line {{next}} dirname = {{dirname ""}}
line {{next}} basename = {{environment "PWD" | basename}}
line {{next}} basename = {{basename "/a/b/c"}}
line {{next}} basename = {{basename "/a/b/c.ext"}}
line {{next}} basename = {{basename "/a/b/c.ext" "ext"}}
line {{next}} basename = {{basename "c.ext.xyz.last"}}
line {{next}} basename = {{basename "c.ext.xyz.last" "last"}}
line {{next}} basename = {{basename "c.ext.xyz.last" "last" "xyz"}}
line {{next}} basename = {{basename "c.ext.xyz.last" "last" "xyz" "ext"}}
line {{next}} now = {{now}}
line {{next}} pausing 1s = {{pause 1000}}
line {{next}} now = {{now}}
line {{next}} started = {{started}}