Skip to content

Instantly share code, notes, and snippets.

View jtay's full-sized avatar

Jaydon Taylor jtay

View GitHub Profile
@jtay
jtay / setup_avahi.sh
Created February 2, 2024 22:50
./setup_avahi.sh --hostname your_hostname --domain your_domain
#!/bin/bash
# Default values
hostname=""
domain="local"
# Function to print usage
usage() {
echo "Usage: $0 --hostname HOSTNAME [--domain DOMAIN]"
echo " --hostname Set the hostname for the server."
@jtay
jtay / badcode.js
Created September 26, 2018 10:50
Validating Student Discount
$(document).ready(function(){
$("button.btn").click(function(){
var NUS_Card_Number = $("#NUS_Card_Number").val();
var systemIntegratorId = '9000049';//Math.floor((Math.random() * 100000000) + 1);
if(NUS_Card_Number == "")
{
alert("NUS Card Number is required.");
return false;