Skip to content

Instantly share code, notes, and snippets.

@sharp0111
sharp0111 / roman-to-arabic-numerals-converter.html
Last active July 17, 2020 17:35
Roman to Arabic Numerals Converter
<!-- HTML elements
UI consists of an input element of type 'number' that ensures only numeric characters and decimal point can be entered.
Handling of decimal points is managed through javascript logic below. Also, a 'convert' button element clicking
on which triggers conversion of arabic numerals into roman numerals and another button element that displays the
result of conversion. In case one wanders why a button element displays the result, the answer has to do with
manageability of styling given quite limited functionality of the platform. -->
<!doctype html>
<html lang="en">
<html>
<body>
<button id="button">Click Me!</button>
<script>
document.getElementById("button").addEventListener("click", function alertMessage() {
alert("button was clicked!");
});
</script>
</body>
</html>
@sharp0111
sharp0111 / express_postgress_knex.md
Created March 20, 2020 05:13 — forked from laurenfazah/express_postgress_knex.md
Cheat Sheet: Setting up Express with Postgres via Knex

Express & Postgres via Knex

Note: <example> is meant to denote text replaced by you (including brackets).

Setup

// global dependencies
npm install -g knex
@sharp0111
sharp0111 / hashTableLinkedList.js
Created January 22, 2018 06:10 — forked from hamannjames/hashTableLinkedList.js
Javascript hash table with linked lists in buckets
// code pen url: https://codepen.io/jaspercreel/pen/RgXjEp
// Declaring a node and list class outside of the hash class avoids binding issues with this
// The node class should only be created with a key value pair
class Node {
constructor(key, value) {
this[key] = value;
this.next = null;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Number guessing game</title>
<style>
html {
font-family: sans-serif;
# urlshortener script in Python derived from https://pythontips.com/2013/08/03/a-url-shortener-in-python/
from __future__ import with_statement
import contextlib
try:
from urllib.parse import urlencode
except ImportError:
from urllib import urlencode
try:
from urllib.request import urlopen
except ImportError:
@sharp0111
sharp0111 / ziptastic.html
Created May 28, 2017 01:49
getcitycountryfromzipcode
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html class="ie ie6 ltie8 ltie9" lang="en"> <![endif]-->
<!--[if IE 7 ]> <html class="ie ie7 ltie8 ltie9" lang="en"> <![endif]-->
<!--[if IE 8 ]> <html class="ie ie8 ltie9" lang="en"> <![endif]-->
<!--[if IE 9 ]> <html class="ie ie9" lang="en"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<title>Improved - Checkout - Step 1 - Hansel and Petal</title>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<footer>