-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
553 lines (525 loc) · 21.9 KB
/
index.html
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
computer spirit guide
</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Aladin|VT323" rel="stylesheet">
<style>
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
body {
background: black;
margin: 0;
color: black;
font-family: 'VT323', monospace;
}
h1 {
color:#baffc9;
font-size: 6em;
text-shadow: 2px 2px #ffe5f9;
margin: 0;
position: relative;
z-index: 20;
}
p {
color: #ffe5f9;
font-size: 2em;
position: relative;
z-index: 20;
}
h3 {
color: #ffe5f9;
font-size: 4em;
font-style: italic;
text-shadow: 2px 2px #baffc9;
position: relative;
z-index: 20;
margin-bottom: 50px;
}
section {
padding: 60px;
}
.intro em {
font-size: 2em;
color: white;
}
section.flex {
font-size: 2.5em;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
width: 100%;
padding: 0px 30px 0px 30px;
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 10;
height: 100vh;
}
section.flex div {
padding: 30px;
opacity: .3;
}
section.toot {
background: black;
font-size: 2.5em;
color: hotpink;
height: 80vh;
width: 90vw;
margin:0 auto;
overflow: scroll;
position: fixed;
top: 10vh;
left: 0;
right: 0;
z-index: 99999;
opacity: 0;
visibility: hidden;
transition: opacity 5s ease-in-out;
}
section.toot.vis {
opacity: 1;
visibility: visible;
transition: opacity 5s ease-in-out;
}
section.toot p {
color: white;
}
section.toot p.intro {
font-size: 1em;
background: black;
padding: 40px 40px 10px 40px;
color: white;
margin-bottom: 45px;
}
section.toot p.intro span {
font-size: 2.5em;
}
section.toot p.command {
font-size: 1.5em;
background: black;
padding: 220px 40px 10px 40px;
color: chartreuse;
margin-bottom: 15px;
word-break: break-all;
}
section.toot p.command.file {
font-size: .675em;
}
section.toot p em {
color: chartreuse;
font-style: normal;
font-weight: bold;
font-size: inherit;
}
section.toot pre {
background: black;
display: block;
padding: 60px 0;
opacity: 1;
position: relative;
z-index: 20;
color: chartreuse;
font-family: 'VT323', monospace;
}
section.toot p.explainer {
font-size: 1em;
padding: 10px 40px 40px 40px;
color: white;
font-style: italic;
margin-bottom: 80px;
line-height: 1.325em;
font-family: 'Aladin', cursive;
}
.images {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100vh;
z-index: 999;
}
.gif.one {position: absolute; top: 30%; right: 2%;}
.gif.two {position: absolute; bottom: 0%; left: -12%;}
.gif.three {position: absolute; top: 40%; left: 1%; }
.gif.four {position: absolute; top: 2%; left: 20%;}
.gif.five {position: absolute; bottom: 10%; right: -4%;}
.gif.six {position: absolute; bottom: 2%; right: 40%; transform: rotate(60deg);}
.gif.seven {position: absolute; top: 5%; right: -14%;}
.gif.eight {position: absolute; top: 77%; right: 20%;}
.gif.nine {position: absolute; top: 1%; left: 1%; transform: rotate(-10deg);}
.gif.ten {position: absolute; top: 20%; left: -5%;}
.gif.eleven {position: absolute; bottom: 20%; right: 10%; transform: rotate(-40deg);}
.gif.twel {position: absolute; bottom: 90%; right: 18%;}
.gif.thirt {position: absolute; bottom: 30%; right: 40%;transform: rotate(20deg);}
.gif.fourt {position: absolute; top: 85%; left: 63%; transform: rotate(20deg);}
.gif.fift {position: absolute; top: 70%; right: 80%; transform: rotate(60deg);}
.gif.sixt {position: absolute; top: 60%; left: 30%; transform: rotate(30deg);}
.gif.sevent {position: absolute; top: 4%; right: 18%; transform: rotate(-10deg);}
.crystal.one {width: 5%; position: absolute; top: 18%; left: 23%;}
.crystal.two {width: 8%; position: absolute; top: 41%; left: 89%;transform: rotate(40deg);}
.crystal.three {width: 5%; position: absolute; top: 62%; left: 3%;}
.crystal.four {width: 8%; position: absolute; top: 81%; left: 39%;}
.button { cursor: pointer; z-index: 99999999;}
/* #third-toot { display: block; visibility: visible; opacity: 1;} */
</style>
</head>
<body>
<section class="intro">
<h1>computer spirit guide</h1>
<h3>calling upon the file spirits and folder gods, these terminal commands will guide your computer to the deepest darkest data of its past, present, and future</h3>
<em>for magical apple computers only</em>
</section>
<section class="flex">
<div>📂 </div><div>📁 </div>
<div>📁 </div><div>📂 </div>
<div>📂 </div><div>📁 </div>
<div>📁 </div><div>📂 </div>
<div>📂 </div><div>📁 </div>
<div>📁 </div><div>📂 </div>
<div>📂 </div><div>📁 </div>
<div>📁 </div><div>📂 </div>
<div>📂 </div><div>📁 </div>
<div>📁 </div><div>📂 </div>
<div>📂 </div><div>📁 </div>
<div>📁 </div><div>📂 </div>
<div>📂 </div><div>📁 </div>
<div>📁 </div><div>📂 </div>
<div>📂 </div><div>📁 </div>
<div>📁 </div><div>📂 </div>
<div>📂 </div><div>📁 </div>
<div>📁 </div><div>📂 </div>
<div>📂 </div><div>📁 </div>
<div>📁 </div><div>📂 </div>
<div>📂 </div><div>📁 </div>
<div>📁 </div><div>📂 </div>
<div>📂 </div><div>📁 </div>
<div>📁 </div><div>📂 </div>
<div>📂 </div><div>📁 </div>
<div>📁 </div><div>📂 </div>
<div>📂 </div><div>📁 </div>
<div>📁 </div><div>📂 </div>
<div>📂 </div><div>📁 </div>
<div>📁 </div><div>📂 </div>
<div>📂 </div><div>📁 </div>
<div>📁 </div><div>📂 </div>
<div>📂 </div><div>📁 </div>
<div>📁 </div><div>📂 </div>
<div>📂 </div><div>📁 </div>
<div>📁 </div><div>📂 </div>
<div>📂 </div><div>📁 </div>
<div>📁 </div><div>📂 </div>
<div>📂 </div><div>📁 </div>
<div>📁 </div><div>📂 </div>
<div>📂 </div><div>📁 </div>
<div>📁 </div><div>📂 </div>
<div>📂 </div><div>📁 </div>
<div>📁 </div><div>📂 </div>
<div>📂 </div><div>📁 </div>
<div>📁 </div><div>📂 </div>
<div>📂 </div><div>📁 </div>
<div>📁 </div><div>📂 </div>
<div>📂 </div><div>📁 </div>
<div>📁 </div><div>📂 </div>
<div>📂 </div><div>📁 </div>
<div>📁 </div><div>📂 </div>
<div>📂 </div><div>📁 </div>
<div>📁 </div><div>📂 </div>
</section>
<div class="images">
<img class="gif one button" id="first-toot-button" data-id="first-toot" src="images/candle-1.gif" />
<img class="gif two" src="images/folder-2.gif" />
<img class="gif three" src="images/candle-2.gif" />
<img class="gif four" src="images/folder-1.gif" />
<img class="gif five" src="images/folder-2.gif" />
<img class="gif six" src="images/folder-3.gif" />
<img class="gif seven" src="images/folder-2.gif" />
<img class="gif eight" src="images/laptop-1.gif" />
<img class="gif nine button" id="third-toot-button" data-id="third-toot" src="images/laptop-2.gif" />
<img class="gif ten" src="images/folder-2.gif" />
<img class="gif eleven" src="images/spirit.gif" />
<img class="gif twel" src="images/candle-2.gif" />
<img class="gif thirt" src="images/candle-2.gif" />
<img class="gif fourt" src="images/laptop-2.gif" />
<img class="gif fift" src="images/laptop-2.gif" />
<img class="gif sixt" src="images/laptop-1.gif" />
<img class="gif sevent" src="images/laptop-1.gif" />
<img class="crystal one button" id="second-toot-button" data-id="second-toot" src="images/crystal-3.png" />
<img class="crystal two" src="images/crystal-2.png" />
<img class="crystal three" src="images/crystal-3.png" />
<img class="crystal four" src="images/crystal-2.png" />
</div>
<section id="first-toot" class="toot">
<p class="intro">
<span>Get in touch with your deepest darkest file.</span>
<br><br>
First open up a brand new terminal window.
<br><br>
Navigate to your home directory. The easiest way to do this is to type <em>cd</em> and then press enter.
<br><br>
Now you can enter the following commands one at a time:
</p>
<p class="command">
mkdir computer-spirit-guide
</p>
<p class="explainer">
this command creates a new folder in your home folder called computer-spirit-guide. this is where all of the new files created throughout this journey will go. do not cd into it just yet...
</p>
<p class="command">
find . -iname "*.txt" -print 2>&1 | grep -v "Permission denied" | sed -e 's/^/./' -e 's/ /\\ /g' > ./computer-spirit-guide/files.txt
</p>
<p class="explainer">
this command searches your entire system and finds any files with the extension of txt. if you want to get in touch with a different kind of file you can replace <em>.txt</em> with <em>.pdf</em> or any other kind of file. the <em>find </em> command is equivalent use the spotlight search (cmd + space) in the GUI. the command makes sure to ignore the files that return with "permission denied". <br><br>finally it places one extra period before the file path. this ensures that the path is absolute rather than relative. once it has all of the file paths for each file the command copies all of them into to a new file called files.txt<br><br>if you are a programmer it might take a while...
</p>
<p class="command">
cd computer-spirit-guide
</p>
<p class="explainer">
cd stands for change directory. after running this command your terminal will execute all future commands INSIDE of the computer-spirit-guide directory
</p>
<p class="command">
sed -e 's;[^/]*/; 📁;g;s; |; 📁;g' ./files.txt > file-tree.txt
</p>
<p class="explainer">
<em>sed</em> is a magical command that makes it easy to edit and replace text. this command finds all of the forward slashes and spaces in the files.txt and replaces it with the folder emoji.<br><br>once everything is replaced it copies each of the the new paths with the folder emojis into file-tree.txt
</p>
<p class="command">
touch spirit-guide.sh
</p>
<p class="explainer">
touch your spirit guide. this command creates a new file called spirit-guide.sh<br><br>
.sh stands for shell, we want to use a shell script because we will be writing executable commands inside so that we can eventually just make one call to this file and it will run everything inside of it.<br><br>
now you can open this file <em>spirit-guide.sh</em> in a code editor<br><br>
you can find the file in your home folder or type <em>open spirit-guide.sh</em> on the command line<br><br>now paste the following code into the file:
</p>
<p class="command file">
#!/bin/bash<br><br>
while read f; do<br>
echo -n "$f "<br>
done <./file-tree.txt<br><br>
maxPath=0<br>
deepestDarkestPath=0<br>
while read path; do<br>
countPath=$(echo ${path} | grep -o '/' | wc -l)<br>
if (( $countPath > $maxPath )); then<br>
maxPath=$countPath;<br>
deepestDarkestPath=$path;<br>
fi;<br>
done <./files.txt<br><br>
cat $deepestDarkestPath > ./deepest-file.txt<br><br>
open ./deepest-file.txt
</p>
<p class="explainer">
this code creates two new variables. one called <em>maxPath</em> and one called <em>deepestDarkestFile</em>. the deepestDarkestFile will be equal to the file that has the most folders before it in its path. the maxPath variable will be equal to the amount of folders in the deepest file's path.<br><br> <em>while read</em> is a bash command that reads each line of a given text file. in this case the file being read is file-tree.txt<br><br> finally we use <em>cat</em> to copy the deepestDarkestPath into a file called <em>deepest-file.txt</em> and open thi
</p>
<p class="command">
chmod u+x spirit-guide.sh
</p>
<p class="explainer">
this command gives your computer permission to execute the commands of the file
</p>
<p class="command">
./spirit-guide.sh
</p>
<p class="explainer">
:-)
</p>
</section>
<section id="second-toot" class="toot">
<p class="intro">
<span>How to recieve a message from a file that wants to talk to you.</span>
<br><br>
Open up a terminal window.
<br><br>
Navigate to your home directory.
<br><br>
Then enter the following commands:
</p>
<p class="command">
mkdir file-spirit-messages
</p>
<p class="explainer">
this command creates a new directory called file-spirit-messages. this is where all of the new files created throughout this guide will go. you do not need to cd into it yet.
</p>
<p class="command">
find . -iname "*.pdf" -print 2>&1 | grep -v "Permission denied" | sed -e 's/^/./' -e 's/ /\\ /g' > ./file-spirit-messages/files.txt
</p>
<p class="explainer">
this command searches your entire system and finds any files with the extension of txt. if you want to get in touch with a different kind of file you can replace <em>.pdf</em> with <em>.rtf</em> or any other kind of file. the <em>find </em> command is equivalent use the spotlight search (cmd + space) in the GUI. the command makes sure to ignore the files that return with "permission denied". <br><br>finally it places one extra period before the file path. this ensures that the path is absolute rather than relative. once it has all of the file paths for each file the command copies all of them into to a new file called files.txt<br><br>if you read a lot it might take a while...
</p>
<p class="command">
cd file-spirit-messages
</p>
<p class="explainer">
cd stands for change directory. this command will make sure that all of the future commands you run will happen inside of the file-spirit-messages folder
</p>
<p class="command">
touch message.sh
</p>
<p class="command">
chmod u+x message.sh
</p>
<p class="explainer">
this command gives your computer permission to execute the commands of the file. now open message.sh in a code editor. inside of message.sh paste the following code:
</p>
<p class="command file">
#!/bin/bash<br><br>
sed -e 's;[\.\/@_~-]; ;g;' ./files.txt > ./two.txt<br>
cat ./two.txt | perl -MList::Util=shuffle -e 'print shuffle(<STDIN>);' > ./rand.txt<br>
cat ./rand.txt | tr ' ' '\n' > ./three.txt<br>
cat ./three.txt | perl -MList::Util=shuffle -e 'print shuffle(<STDIN>);' > ./four.txt
cat ./four.txt | tr '\n' ' ' > ./five.txt<br>
sed -e 's;pdf; ;g;' ./four.txt > ./message.txt<br><br>
while read line; do<br>
n=$((n+1))<br><br>
if [[ $n -gt 1 && (30 -gt $n)]]<br>
then<br>
mess+=" ${line}"<br>
fi<br>
done < ./message.txt<br><br>
echo " "<br>
echo " "<br>
echo " "<br>
echo " "<br>
`echo $mess > random-message.txt`<br>
echo " "<br>
echo " "<br>
echo " "<br>
echo " "<br>
echo " "<br><br>
while IFS= read -r -n1 char; do<br>
echo -n "$char"<br>
sleep .1;<br>
done < ./random-message.txt<br>
</p>
<p class="explainer">
save the file and go back to your terminal window and enter the following command to receive your message:
</p>
<p class="command">
./message.sh
</p>
<p class="explainer">
:-)
</p>
</section>
<section id="third-toot" class="toot">
<p class="intro">
<span>How to get give your computer a tarot reading.</span>
<br><br>
Open up a terminal window.
<br><br>
Navigate to your home directory.
<br><br>
Then enter the following commands:
</p>
<p class="command">
mkdir computarot
</p>
<p class="explainer">
this command creates a new directory called computarot. this is where all of the new files created throughout this guide will go.
</p>
<p class="command">
cd computarot
</p>
<p class="explainer">
cd stands for change directory. after running this command your terminal will execute all future commands INSIDE of the computarot directory
</p>
<p class="command">
touch ./tarot.sh
</p>
<p class="explainer">
</p>
<p class="command">
brew install jq
</p>
<p class="explainer">
the above command requires a library called JQ. if you have homebrew you can run the above command.
</p>
<p class="command">
sudo apt-get install jq
</p>
<p class="explainer">
if you don't have homebrew you can try the above linux command.
</p>
<p class="command">
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
</p>
<p class="explainer">
if you want to install homebrew to run JQ you can enter above command.
</p>
<p class="command">
chmod u+x tarot.sh
</p>
<p class="explainer">
don't forget give the tarot.sh file the correct permissions! now open the tarot.sh file in a code editor. paste the following code:
</p>
<p class="command file">
#!/bin/bash<br><br>
do_reading() {<br>
for run in {1..3}<br>
do<br>
foo=$(curl 'https://raw.githubusercontent.com/dariusk/corpora/master/data/divination/tarot_interpretations.json')<br><br>
x=`echo $foo | jq --arg random $((0 + RANDOM % 78)) '.["tarot_interpretations"] | .[$random|tonumber].name'`<br><br>
y=`echo $foo | jq --arg random $((0 + RANDOM % 78)) '.["tarot_interpretations"] | .[$random|tonumber].keywords[0]'`<br><br>
mkdir "${x//\"}"<br>
cd "${x//\"}"<br>
open .<br>
mkdir "${y//\"}"<br>
mdfind "${y//\"}" | head -3 | while IFS= read -r filez; do cp "$filez" "${y//\"}"; done<br>
cd "${y//\"}"<br>
open .<br>
cd ..<br>
cd ..<br>
done<br>
}<br><br>
cd ..<br><br>
if [ -d "computarot-reading" ]; then<br>
rm -r computarot-reading<br><br>
mkdir computarot-reading<br><br>
cd computarot-reading<br><br>
do_reading<br><br>
elif [ ! -d "computarot-reading" ]; then<br>
mkdir computarot-reading<br><br>
cd computarot-reading<br><br>
do_reading<br>
fi<br><br>
</p>
<p class="explainer">
save the file and go back to your terminal window and enter the following command to receive your message:
</p>
<p class="command">
./tarot.sh
</p>
<p class="explainer">
:-)
</p>
</section>
<script type="application/javascript">
const firstTootButton = document.getElementById("first-toot-button");
firstTootButton.addEventListener('click', showToot);
const secondTootButton = document.getElementById("second-toot-button");
secondTootButton.addEventListener('click', showToot);
const thirdTootButton = document.getElementById("third-toot-button");
thirdTootButton.addEventListener('click', showToot);
function showToot() {
const tootEl = document.getElementById(this.getAttribute('data-id'));
tootEl.appendChild(this);
tootEl.classList.toggle("vis");
if (!tootEl.classList.contains("vis")) {
console.log(tootEl, this);
document.querySelectorAll('.images')[0].appendChild(this);
}
}
</script>
</body>
</html>