Skip to content

Instantly share code, notes, and snippets.

View BenjaminBrodwolf's full-sized avatar

Benjamin Brodwolf BenjaminBrodwolf

View GitHub Profile
@aerrity
aerrity / client.js
Last active April 9, 2024 21:33
Node, Express & MongoDB: Button click example
console.log('Client-side code running');
const button = document.getElementById('myButton');
button.addEventListener('click', function(e) {
console.log('button was clicked');
fetch('/clicked', {method: 'POST'})
.then(function(response) {
if(response.ok) {
console.log('click was recorded');
@jewelsea
jewelsea / Clock.java
Created May 11, 2012 08:52
Sample of an animated clock in JavaFX
import javafx.animation.*;
import javafx.application.Application;
import javafx.event.*;
import javafx.geometry.Pos;
import javafx.scene.*;
import javafx.scene.control.Label;
import javafx.scene.effect.Glow;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;