forked from gitstua/trmnl-plugin-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample.json
More file actions
137 lines (137 loc) · 4.15 KB
/
sample.json
File metadata and controls
137 lines (137 loc) · 4.15 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
{
"snippets": [
{
"lines": [
"SELECT * ",
"FROM student_scores",
"WHERE id = {**TRMNL**}",
"ORDER BY score score DESC"
]
},
{
"lines": [
"function _0x0001() ",
"{",
" return Buffer.from('{**TRMNL**}', 'base64');",
"}"
]
},
{
"lines": [
"Error: 0x{**TRMNL**} at 5f4dcc3b5aa765d61d8327deb882cf99"
]
},
{
"lines": [
"if(typeof(message)!=='string'){",
"ws.close({**TRMNL**},\"Only JSON-text message allowed\");",
"return;",
"}catch (err){",
"ws.close(\"Only JSON-text message allowed\");",
"return;"
]
},
{
"lines": [
"SELECT * FROM users WHERE id = {**TRMNL**} "
]
},
{
"lines": [
"console.log((0x{**TRMNL**}).toString(2))"
]
},
{
"lines": [
"const text = '{**TRMNL**}encodedText';",
"const decoded = atob(text);"
]
},
{
"lines": [
"import { createHash } from 'crypto';",
"const hash = createHash('sha256').update('{**TRMNL**}data').digest('hex');"
]
},
{
"lines": [
"at Parser.parseTokens (/Users/stu/code/trmnl-plugins/node_modules/liquidjs/dist/liquid.node.cjs.js:4531:33)",
"at Parser.parse (/Users/stu/code/trmnl-plugins/node_modules/liquidjs/dist/liquid.node.cjs.js:4525:21)",
"at Liquid.parse (/Users/stu/code/trmnl-plugins/node_modules/liquidjs/dist/liquid.node.cjs.js:{**TRMNL**}:28)"
]
},
{
"lines": [
"if(typeof(message)!=='string'){",
" ws.close({**TRMNL**},\"Only JSON-text message allowed\");",
" return;",
"}"
]
},
{
"lines": [
"try {",
" const data = JSON.parse('{**TRMNL**}');",
"} catch (err) {",
" console.error('Invalid JSON at line {**TRMNL**}');",
"}"
]
},
{
"lines": [
"const time = '{**TRMNL**}';"
]
},
{
"lines": [
"$echo the time was '{**TRMNL**}' "
]
},
{
"lines": [
"typedef struct DeviceStatusStamp",
"{",
" int8_t wifi_rssi_level;",
" char wifi_status[30];",
" uint32_t refresh_rate;",
" uint32_t time_since_last_sleep;",
" char current_fw_version[10];",
" char special_function[{**TRMNL**}];",
" float battery_voltage;",
" char wakeup_reason[30];",
" uint32_t free_heap_size;",
" ",
" ScreenStatus screen_status;",
"} DeviceStatusStamp;"
]
},
{
"lines": [
"else if (pin == HIGH && elapsed > {**TRMNL**})",
"{",
" Log_info(\"Button time=%d pin=%d: detected no-action\", elapsed, pin);",
" return NoAction;",
"}"
]
},
{
"lines": [
"Paint_SelectImage(BlackImage);",
"Paint_Clear(WHITE);",
"Paint_DrawBitMap(image_buffer + {**TRMNL**});"
]
},
{
"lines": [
"size_t chunkSize = _min({**TRMNL**}, diff);",
"uint16_t res = file.write(in_buffer + bytesWritten, chunkSize);"
]
},
{
"lines": [
"#define WIFI_MAX_SSID_LENGTH {**TRMNL**}",
"#define WIFI_MAX_PASSWORD_LENGTH 40"
]
}
]
}