Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang="en-US" dir="ltr">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>HTML Auth Example</title>
<style>
* {
<!DOCTYPE html>
<html lang="en-US" dir="ltr">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>HTML Auth Example</title>
<style>
npx http-server

HTML Dynamic Auth Elements and Class Name

Specific Auth Element

  • auth-button [auth-button-settings, auth-button-login, auth-button-logout, auth-button-signup]
  • auth-href-issuer-settings Will change the href attribute of to the location of the User Settings page provided by the issuer
function attachFormSubmit(form, baseid, tableToGet, preventDefault=true){
form.addEventListener('submit', (event) => {
if (preventDefault) {
console.log("preventDefault", preventDefault);
event.preventDefault();
event.stopPropagation();
}
if (typeof form.validationFunction === 'function' && !form.validationFunction(event)) {
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAgEAh+BODkBX2jNQgsNn2oJQ923PPm/dIOs7/vNDwwdCZhdcpf33ReACVH/ufyxaWkb5zhqbLzRtUYEUcKAZX/29XMEwlisvbO7GodF8KKj/H0e+yeoC2LZQEQU/nx2eNeVaSBZdqyI8sa0qC6YvILDy4mCLMeuDOdbKRh11dNfIvvt3zDb5NvIMWCFc6b9YqDpFwdKhRWs/tVSfc1P0hJgtvIOqpMZT1YbTT/qoXBYj1v739ueZ7wxTyTFX95Ub4oQoDuGIuccZSCrCephdhTMUdJJXrr4P4fA8qae2wXc3calhgolu4lm2m0ku4/Qgqik8YSI5Lxmr4jh78D4HS7aFYmbRM0Ryj/xnoBTHYAV21Pq9NiT0tgtKRi4VXuDhY61HCblOnPngOHmxDhMP9mVFRzztbW+XjHdouObacREZB0A4ixljOFJPDtMpSykHpPUjCKMwy5zucODSHi5K6jwb9E5FAg7yuG3yh87HSwDDjYonkiU3GmlgvjQg80fa4HX+/FvgBkhJDL+6j5M3cLDWSm9P+9/trMzMlw2QjfEeUsCbTUJmfJkWxe5kgBZGig5T8daYcs3tfi11ze7EVDDpjni5wcQp+EaYgwaX0GT7XlV3GT2MlNfr/oPGmztLLRntXwpaw25o5e3lBpBeBvaugl9YN9TQw/fSru42QVc3mo0=
@nf3
nf3 / addme_ssh.sh
Last active September 15, 2020 16:52
#!/bin/bash
#run with:
# wget --no-check-certificate https://gist.githubusercontent.com/nf3/37fbf8916208498b95ffbf7fabfcb26f/raw/addme_ssh.sh
# chmod +x ./addme_ssh.sh
# sudo bash -x addme_ssh.sh
# or
# sudo bash -x echo [PASSWORD] | addme_ssh.sh but this will put the password on the bashhistory
read -s -p "Password: " PASSWORD
@nf3
nf3 / .bashrc
Created August 28, 2016 21:49
ssh-agent .bashrc script
# Note: not sure who wrote this, but thank you
# Note: ~/.ssh/environment should not be used, as it
# already has a different purpose in SSH.
env=~/.ssh/agent.env
# Note: Don't bother checking SSH_AGENT_PID. It's not used
# by SSH itself, and it might even be incorrect
# (for example, when using agent-forwarding over SSH).
# The MIT License (MIT)
# Copyright (c) 2015 Neil Proctor license@neilproctor.com
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions: