Skip to content

Instantly share code, notes, and snippets.

View blargism's full-sized avatar

Joe Mills blargism

  • ikbi
  • Dallas, TX
View GitHub Profile
@blargism
blargism / basic-web-component.js
Created August 10, 2022 20:44
Basic Web Component
export default class ComponentClass extends HTMLElement {
constructor() {
super();
// set sane defaults if desired.
this._value = null;
}
get values() {
return this._value;
}
@blargism
blargism / basic-wc-with-lit-html.js
Last active October 4, 2022 11:56
Basic Web Component with lit-html
import { html, render } from 'lit-html';
export default class ComponentClass extends HTMLElement {
constructor() {
super();
// set sane defaults if desired.
this._value = null;
}
get values() {
@blargism
blargism / auth_activate.sql
Last active February 7, 2018 23:08
Example of how you can do authentication on Postgres.
CREATE OR REPLACE FUNCTION auth_activate(
_activation character varying,
_member_id integer
) RETURNS member AS $$
DECLARE
_auth auth;
_member member;
BEGIN
SELECT * INTO _auth