-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcommunity.js
More file actions
118 lines (102 loc) · 2.74 KB
/
community.js
File metadata and controls
118 lines (102 loc) · 2.74 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
// --- #1 ---
try {
buildSomethingCool();
} catch (e) {
blameTheWifi();
tryAgain();
}
// --- #2 ---
DELETE FROM comfort_zone;
INSERT INTO growth (creativity, grit, community);
COMMIT;
-- no rollback
// --- #3 ---
const community = developers.filter(
dev => dev.shares && dev.helps && dev.shows_up
);
// --- #4 ---
function demo(project) {
if (presenter.isNervous()) {
crowd.cheer();
}
return standing_ovation;
}
// --- #5 --- by Isaac Vicentini
for (const dev of team) {
dev.say("just a small change");
sprint.scope++;
}
// --- #6 --- by Isaac Vicentini
do {
imagine();
build();
improve();
} while (possibility.exists());
// --- #7 --- by Kristen Dettman
var everyone = new GlideRecord('sys_user');
everyone.addQuery('role', 'IN', 'developer,admin,architect,analyst');
everyone.addQuery('active', true);
everyone.query();
while (everyone.next()) {
community.add(everyone); // different roles, one community
}
// --- #8 ---
if (current.update()) {
return (╯°□°)╯︵ ┻━┻;
}
// Stop trying to make current.update() happen.
// --- #9 --- by Astrid
let rec = new GlideRecord('sys_audit');
rec.query(); // I like to live dangerously
// --- #10 --- by eric
var grSysUser = new GlideRecord('sys_user');
grSysUser.addEncodedQuery("user_name=abel.tuter");
grSysUser.orderBy('name');
grSysUser.setLimit(20);
grSysUser.query();
// --- #11 --- by eric
if (gr.next()) {
gs.log("weeee");
}
// WHY ISN'T THIS WORKING?!
// (forgot to .query())
// --- #12 --- by jarodm
if (NowUniversity.courseState == 'completed') {
excitement.goBoom();
Regrets.goPoof();
}
// --- #13 --- by Claude
var gr = new GlideRecord('sys_update_set');
gr.addQuery('state', 'in progress');
gr.query();
// 47 update sets. all "in progress". all from 2019.
// no one knows which one is safe to close.
// --- #14 --- by Claude
// works on my PDI
function migrate(code) {
var local = code.test(); // pass
var dev = code.promote(); // pass
var prod = code.deploy(); // "record not found"
return gs.addErrorMessage("works on my PDI");
}
// --- #15 --- by Claude
var script = new GlideRecord('sys_script');
script.addQuery('name', 'CONTAINS', 'Copy of Copy of');
script.query();
// 87 records found
// author: admin
// last updated: 3 years ago
// description: "testing - DELETE LATER"
// --- #16 --- by Claude
gs.log(gr.getValue('state')); // null
gs.log(gr.state); // null
gs.log(gr.state.toString()); // null
gs.log(gr.state + ""); // null
gs.log("please"); // null
// --- #17 --- by Nick
// "Claude, fix the bug directly in production, make no mistakes"
try {
claude.fix(prod.bug, { mistakes: 0 });
} catch (e) {
// this catch block is purely decorative
}