-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
537 lines (482 loc) · 25.8 KB
/
Copy pathindex.html
File metadata and controls
537 lines (482 loc) · 25.8 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<base href="/">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>jbyrd's MySpace</title>
<link rel="stylesheet" href="css/style.css">
<style>
/* jbyrd's custom animated background */
body {
background: url('images/bg-jbyrd.gif') repeat;
background-attachment: fixed;
}
.container {
background: #000 !important; /* Black */
}
.page-wrapper {
background: #000 !important; /* Black */
transform: scale(0.9);
transform-origin: top center;
margin-bottom: -100px;
}
</style>
</head>
<body>
<div class="page-wrapper">
<div class="header">
<a href="https://jbyrd.org" target="_blank">
<img src="images/myspace-logo.png" alt="MySpace" class="logo">
</a>
</div>
<div class="container">
<!-- Left Column -->
<div class="left-column">
<div class="profile-box">
<h2 class="section-header">jbyrd</h2>
<div class="profile-pic">
<img src="images/profile.jpeg" alt="jbyrd">
</div>
<div class="profile-info">
<p><strong>"Why should I change? He's the one who sucks."</strong></p>
<p>💼 Systems Administrator</p>
<p>Cubicle 4E, Initech</p>
</div>
<div class="mood">
<strong>Mood:</strong> <span class="mood-text">Case of the Mondays 📎</span>
</div>
</div>
<div class="interests-box">
<h3 class="section-header orange">jbyrd's Interests</h3>
<div class="interests">
<p><strong>General:</strong></p>
<p>Server Administration, Building PCs, Home Networks, Running Linux Boxes</p>
<p><strong>Tech Stack:</strong></p>
<p>Red Hat Linux, Apache, MySQL, Perl/CGI, VMware, Nagios</p>
<p><strong>Philosophy:</strong></p>
<p>Script everything, monitor everything, backup everything</p>
</div>
</div>
<div class="favorites-box">
<h3 class="section-header orange">My Favorite Sites</h3>
<div class="favorites-list">
<a href="https://ansible.jbyrd.org" target="_blank">🤖 Ansibleize Everything</a>
<a href="https://blog.jbyrd.org" target="_blank">📝 jbyrd's blog</a>
<a href="/music-player.html">🎵 Music Collection (67 tracks)</a>
<a href="https://money.jbyrd.org" target="_blank">💰 Microsoft Money</a>
<a href="https://n8n.jbyrd.org" target="_blank">🔄 Cron Jobs</a>
<a href="https://backup.jbyrd.org" target="_blank">💾 Norton Ghost</a>
<a href="https://ha.jbyrd.org" target="_blank">🏠 X10 Home Automation</a>
<a href="https://grafana.jbyrd.org" target="_blank">📊 Cacti/MRTG</a>
<a href="https://plex.jbyrd.org" target="_blank">🎬 Windows Media Center</a>
<a href="https://loki.jbyrd.org" target="_blank">📝 Syslog Viewer</a>
<a href="https://alerts.jbyrd.org" target="_blank">🚨 Nagios</a>
</div>
</div>
</div>
<!-- Right Column -->
<div class="right-column">
<div class="main-content">
<h2 class="section-header blue">🌟 Welcome to jbyrd's myspace page! 🌟</h2>
<div class="about-me">
<h3 class="orange-header">About Me:</h3>
<p>Look, I'm not just some code monkey. I could write a virus that would completely take down this entire company's infrastructure.
I'm talking TOTAL devastation. But instead, I'm here writing Perl scripts and fixing your broken printers.</p>
<p>I've got a home network with more servers than most small businesses. Red Hat Linux boxes, Apache web servers,
MySQL databases... the whole nine yards. It's like having my own little datacenter, except I don't have to wear a tie.</p>
<p>If you could get your Exchange server to stop crashing, that'd be greeeat. Also, I'm gonna need you to come in on Saturday
to reboot the file server. Thanks.</p>
<p><em>*adjusts pocket protector*</em> Now back to monitoring Nagios alerts... 🖥️</p>
</div>
<div class="music-player-box">
<div class="retro-player">
<div class="player-display">
<div class="track-info">
<div class="track-title" id="track-title">Mr. Brightside - The Killers</div>
<div class="track-artist" id="track-artist">Hot Fuss (2004)</div>
</div>
<div class="visualizer">
<div class="bar"></div><div class="bar"></div><div class="bar"></div><div class="bar"></div><div class="bar"></div>
</div>
</div>
<div class="player-controls">
<button class="ctrl-btn" onclick="prevTrack()">⏮</button>
<button class="ctrl-btn play-btn" onclick="togglePlay()">▶</button>
<button class="ctrl-btn" onclick="nextTrack()">⏭</button>
<button class="ctrl-btn" onclick="toggleShuffle()">🔀</button>
</div>
<div class="progress-container">
<div class="progress-bar" onclick="seekTo(event)">
<div class="progress-fill" id="progress-fill"></div>
</div>
<div class="time-display">
<span id="current-time">0:00</span>
<span id="duration">0:00</span>
</div>
</div>
<div class="volume-container">
<span class="volume-label">🔊</span>
<div class="volume-slider" onclick="setVolume(event)">
<div class="volume-fill" id="volume-fill"></div>
</div>
</div>
</div>
<div class="playlist-box">
<div class="playlist-scroll" id="playlist"></div>
</div>
<audio id="audioPlayer" style="display: none;" preload="none"></audio>
</div>
<div class="friends-box">
<h3 class="orange-header">👥 jbyrd's Friends</h3>
<p class="subtitle" style="color: #fff;">jbyrd has <strong style="color: #ffaa00;">12</strong> friends</p>
<div class="friends-grid">
<div class="friend-item">
<a href="profiles/tom.html">
<img src="images/profiles/thumb_tom_anderson.png" alt="Tom" width="100" height="100">
</a>
<span class="friend-name">Tom</span>
</div>
<div class="friend-item">
<a href="profiles/jesse.html">
<img src="images/profiles/thumb_jesse.png" alt="Jesse" width="100" height="100">
</a>
<span class="friend-name">Jesse</span>
</div>
<div class="friend-item">
<a href="profiles/michelle.html">
<img src="images/profiles/thumb_michelle.png" alt="Michelle" width="100" height="100">
</a>
<span class="friend-name">Michelle</span>
</div>
<div class="friend-item">
<a href="profiles/brandon.html">
<img src="images/profiles/thumb_brandon.png" alt="Brandon" width="100" height="100">
</a>
<span class="friend-name">Brandon</span>
</div>
<div class="friend-item">
<a href="profiles/ashley.html">
<img src="images/profiles/thumb_ashley.png" alt="Ashley" width="100" height="100">
</a>
<span class="friend-name">Ashley</span>
</div>
<div class="friend-item">
<a href="profiles/tyler.html">
<img src="images/profiles/thumb_tyler.png" alt="Tyler" width="100" height="100">
</a>
<span class="friend-name">Tyler</span>
</div>
<div class="friend-item">
<a href="profiles/raven.html">
<img src="images/profiles/thumb_raven.png" alt="Raven" width="100" height="100">
</a>
<span class="friend-name">Raven</span>
</div>
<div class="friend-item">
<a href="profiles/brittany.html">
<img src="images/profiles/thumb_brittany.png" alt="Brittany" width="100" height="100">
</a>
<span class="friend-name">Brittany</span>
</div>
<div class="friend-item">
<a href="profiles/steven.html">
<img src="images/profiles/thumb_steven.png" alt="Steven" width="100" height="100">
</a>
<span class="friend-name">Steven</span>
</div>
<div class="friend-item">
<a href="profiles/brock.html">
<img src="images/profiles/thumb_brock.png" alt="Brock" width="100" height="100">
</a>
<span class="friend-name">Brock</span>
</div>
<div class="friend-item">
<a href="profiles/billy.html">
<img src="images/profiles/thumb_billy.png" alt="Billy" width="100" height="100">
</a>
<span class="friend-name">Billy</span>
</div>
<div class="friend-item">
<a href="profiles/specialt.html">
<img src="images/profiles/thumb_specialt.png" alt="Special T" width="100" height="100">
</a>
<span class="friend-name">Special T</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<p>© 2025 jbyrd.org | Self-Hosted Infrastructure | Deployed with Ansible 🚀</p>
<p class="disclaimer">This is a parody page. MySpace is a trademark of MySpace Inc. No copyright infringement intended.</p>
</div>
</div>
<script>
// Simple MP3 Player
let isPlaying = false;
// Track list with local MP3 files
const tracks = [
{ title: "Yeah!", artist: "Usher feat. Lil Jon & Ludacris", url: "audio/01 - Usher - Yeah! (Official Video) ft. Lil Jon, Ludacris.mp3" },
{ title: "Uptown Funk", artist: "Mark Ronson feat. Bruno Mars", url: "audio/02 - Mark Ronson - Uptown Funk (Official Video) ft. Bruno Mars.mp3" },
{ title: "Billie Jean", artist: "Michael Jackson", url: "audio/03 - Michael Jackson - Billie Jean (Official Video).mp3" },
{ title: "Bartender", artist: "T-Pain feat. Akon", url: "audio/04 - T-Pain - Bartender (Official HD Video) ft. Akon.mp3" },
{ title: "1, 2 Step", artist: "Ciara feat. Missy Elliott", url: "audio/05 - Ciara - 1, 2 Step (Official Video) ft. Missy Elliott.mp3" },
{ title: "Complicated", artist: "Avril Lavigne", url: "audio/06 - Avril Lavigne - Complicated (Official Video).mp3" },
{ title: "Let Me Love You", artist: "Mario", url: "audio/07 - Mario - Let Me Love You (Official Video).mp3" },
{ title: "In Da Club", artist: "50 Cent", url: "audio/08 - 50 Cent - In Da Club (Official Music Video).mp3" },
{ title: "Dilemma", artist: "Nelly feat. Kelly Rowland", url: "audio/09 - Nelly - Dilemma (Official Music Video) ft. Kelly Rowland.mp3" }
];
let currentTrack = 0;
const audio = document.getElementById('audioPlayer');
// Render playlist
function renderPlaylist() {
const playlistEl = document.getElementById('playlist');
playlistEl.innerHTML = tracks.map((track, index) => `
<div class="playlist-item ${index === currentTrack ? 'active' : ''}" onclick="playTrack(${index})">
<span class="track-number">${(index + 1).toString().padStart(2, '0')}.</span>
${track.title} - ${track.artist}
</div>
`).join('');
}
function updateDisplay() {
document.getElementById('track-title').textContent = tracks[currentTrack].title;
document.getElementById('track-artist').textContent = tracks[currentTrack].artist;
renderPlaylist();
}
function playTrack(index) {
currentTrack = index;
audio.src = tracks[currentTrack].url;
audio.play().then(() => {
isPlaying = true;
document.querySelector('.play-btn').textContent = '⏸';
document.querySelectorAll('.visualizer .bar').forEach(bar => {
bar.style.animationPlayState = 'running';
});
}).catch(e => {
console.error('Audio play failed:', e);
});
updateDisplay();
}
function togglePlay() {
const playBtn = document.querySelector('.play-btn');
if (isPlaying) {
audio.pause();
playBtn.textContent = '▶';
isPlaying = false;
document.querySelectorAll('.visualizer .bar').forEach(bar => {
bar.style.animationPlayState = 'paused';
});
} else {
if (!audio.src) {
audio.src = tracks[currentTrack].url;
}
audio.play().then(() => {
playBtn.textContent = '⏸';
isPlaying = true;
document.querySelectorAll('.visualizer .bar').forEach(bar => {
bar.style.animationPlayState = 'running';
});
}).catch(e => {
console.error('Audio play failed:', e);
});
}
}
function nextTrack() {
currentTrack = (currentTrack + 1) % tracks.length;
if (isPlaying) {
playTrack(currentTrack);
} else {
updateDisplay();
}
}
function prevTrack() {
currentTrack = (currentTrack - 1 + tracks.length) % tracks.length;
if (isPlaying) {
playTrack(currentTrack);
} else {
updateDisplay();
}
}
function toggleShuffle() {
currentTrack = Math.floor(Math.random() * tracks.length);
if (isPlaying) {
playTrack(currentTrack);
} else {
updateDisplay();
}
}
// Format time from seconds to MM:SS
function formatTime(seconds) {
if (isNaN(seconds)) return '0:00';
const mins = Math.floor(seconds / 60);
const secs = Math.floor(seconds % 60);
return `${mins}:${secs.toString().padStart(2, '0')}`;
}
// Update progress bar
function updateProgress() {
if (audio.duration) {
const progressPercent = (audio.currentTime / audio.duration) * 100;
document.getElementById('progress-fill').style.width = progressPercent + '%';
document.getElementById('current-time').textContent = formatTime(audio.currentTime);
document.getElementById('duration').textContent = formatTime(audio.duration);
}
}
// Seek to position in track
function seekTo(event) {
if (audio.duration) {
const progressBar = event.currentTarget;
const rect = progressBar.getBoundingClientRect();
const percent = (event.clientX - rect.left) / rect.width;
audio.currentTime = percent * audio.duration;
}
}
// Set volume
function setVolume(event) {
const volumeSlider = event.currentTarget;
const rect = volumeSlider.getBoundingClientRect();
const percent = (event.clientX - rect.left) / rect.width;
audio.volume = Math.max(0, Math.min(1, percent));
document.getElementById('volume-fill').style.width = (percent * 100) + '%';
}
// Event listeners
audio.addEventListener('timeupdate', updateProgress);
audio.addEventListener('loadedmetadata', updateProgress);
// Auto-advance to next track when audio ends
audio.addEventListener('ended', () => {
nextTrack();
});
// Initialize
audio.volume = 0.7; // Set default volume to 70%
updateDisplay();
renderPlaylist();
</script>
</body>
</html>
const SPOTIFY_CONFIG = {
clientId: '0d3668e069af4fe8a1d17b8d77785a5c',
redirectUri: 'https://jbyrd.org/spotify-callback.html',
scopes: [
'streaming',
'user-read-email',
'user-read-private',
'user-read-playback-state',
'user-modify-playback-state'
]
};
class SpotifyPlayer {
constructor() {
this.player = null;
this.deviceId = null;
this.accessToken = localStorage.getItem('spotify_access_token');
this.currentTrackIndex = 0;
this.playlistUris = [
'spotify:track:003vvx7Niy0yvhvHt4a68B', // Mr. Brightside - The Killers
'spotify:track:0J9IPTfaGFz0GTxeQNJuqR', // In Too Deep - Sum 41
'spotify:track:3YBZIN3rekqsKxbJc9FZko', // The Middle - Jimmy Eat World
'spotify:track:3UazzelPQVpLp5E0wXfA5i', // Sk8er Boi - Avril Lavigne
'spotify:track:0WqIKmW4BTrj3eJFmnCKMv' // All Star - Smash Mouth
];
this.trackInfo = [
{ title: "Mr. Brightside - The Killers", artist: "Hot Fuss (2004)" },
{ title: "In Too Deep - Sum 41", artist: "All Killer No Filler (2001)" },
{ title: "The Middle - Jimmy Eat World", artist: "Bleed American (2001)" },
{ title: "Sk8er Boi - Avril Lavigne", artist: "Let Go (2002)" },
{ title: "All Star - Smash Mouth", artist: "Astro Lounge (1999)" }
];
}
// Generate PKCE code verifier and challenge
async generatePKCE() {
const codeVerifier = this.generateRandomString(128);
localStorage.setItem('pkce_code_verifier', codeVerifier);
const digest = await crypto.subtle.digest('SHA-256', new TextEncoder().encode(codeVerifier));
const codeChallenge = btoa(String.fromCharCode(...new Uint8Array(digest)))
.replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_');
return { codeVerifier, codeChallenge };
}
generateRandomString(length) {
const possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
const values = crypto.getRandomValues(new Uint8Array(length));
return values.reduce((acc, x) => acc + possible[x % possible.length], '');
}
async authenticate() {
const { codeChallenge } = await this.generatePKCE();
const authUrl = `https://accounts.spotify.com/authorize?` +
`client_id=${SPOTIFY_CONFIG.clientId}` +
`&response_type=code` +
`&redirect_uri=${encodeURIComponent(SPOTIFY_CONFIG.redirectUri)}` +
`&scope=${encodeURIComponent(SPOTIFY_CONFIG.scopes.join(' '))}` +
`&code_challenge_method=S256` +
`&code_challenge=${codeChallenge}`;
const width = 450, height = 730;
const left = window.screen.width / 2 - width / 2;
const top = window.screen.height / 2 - height / 2;
window.open(authUrl, 'Spotify Login', `width=${width},height=${height},left=${left},top=${top}`);
}
async init() {
if (!this.accessToken) return false;
return new Promise((resolve) => {
if (!window.Spotify) {
const script = document.createElement('script');
script.src = 'https://sdk.scdn.co/spotify-player.js';
document.head.appendChild(script);
}
window.onSpotifyWebPlaybackSDKReady = () => {
this.player = new window.Spotify.Player({
name: "jbyrd's MySpace Player",
getOAuthToken: cb => { cb(this.accessToken); },
volume: 0.7
});
this.player.addListener('ready', ({ device_id }) => {
this.deviceId = device_id;
resolve(true);
});
this.player.addListener('player_state_changed', (state) => {
if (state) this.updateUIFromState(state);
});
this.player.connect();
};
});
}
updateUIFromState(state) {
const playBtn = document.querySelector('.play-btn');
if (playBtn) playBtn.textContent = state.paused ? '▶' : '⏸';
document.querySelectorAll('.visualizer .bar').forEach(bar => {
bar.style.animationPlayState = state.paused ? 'paused' : 'running';
});
}
async playTrack(index) {
if (!this.deviceId) return;
this.currentTrackIndex = index;
document.getElementById('track-title').textContent = this.trackInfo[index].title;
document.getElementById('track-artist').textContent = this.trackInfo[index].artist;
await fetch(`https://api.spotify.com/v1/me/player/play?device_id=${this.deviceId}`, {
method: 'PUT',
body: JSON.stringify({ uris: [this.playlistUris[index]] }),
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${this.accessToken}`
}
});
}
async togglePlay() {
if (this.player) this.player.togglePlay();
}
async nextTrack() {
this.currentTrackIndex = (this.currentTrackIndex + 1) % this.playlistUris.length;
await this.playTrack(this.currentTrackIndex);
}
async prevTrack() {
this.currentTrackIndex = (this.currentTrackIndex - 1 + this.playlistUris.length) % this.playlistUris.length;
await this.playTrack(this.currentTrackIndex);
}
async shuffle() {
this.currentTrackIndex = Math.floor(Math.random() * this.playlistUris.length);
await this.playTrack(this.currentTrackIndex);
}
}
const spotifyPlayer = new SpotifyPlayer();
</script>
</body>
</html>