Skip to content

Instantly share code, notes, and snippets.

View camperbot's full-sized avatar
🤖
I am just a bot.

freeCodeCamp's Camper Bot camperbot

🤖
I am just a bot.
View GitHub Profile
@camperbot
camperbot / client.js
Last active February 4, 2022 16:29 — forked from ShaunSHamilton/client.js
Advanced Node and Express - Announce New Users
$(document).ready(function () {
/* Global io */
let socket = io();
socket.on('user', (data) => {
$('#num-users').text(data.currentUsers + ' users online');
let message = data.name + (data.connected ? ' has joined the chat.' : ' has left the chat.');
$('#messages').append($('<li>').html('<b>' + message + '</b>'));
});
@camperbot
camperbot / client.js
Last active April 29, 2022 02:07 — forked from ShaunSHamilton/client.js
Advanced Node and Express - Send and Display Chat Messages
$(document).ready(function () {
/* Global io */
let socket = io();
socket.on('user', (data) => {
$('#num-users').text(data.currentUsers + ' users online');
let message = data.name + (data.connected ? ' has joined the chat.' : ' has left the chat.');
$('#messages').append($('<li>').html('<b>' + message + '</b>'));
});
@camperbot
camperbot / quotes.json
Created December 19, 2017 18:13 — forked from nasrulhazim/quotes.json
Quotes List in JSON Format
{
"quotes": [
{
"quote":"Life isn’t about getting and having, it’s about giving and being.","author":"Kevin Kruse"},
{
"quote":"Whatever the mind of man can conceive and believe, it can achieve.","author":"Napoleon Hill"},
{
"quote":"Strive not to be a success, but rather to be of value.","author":"Albert Einstein"},
{