Skip to content

Instantly share code, notes, and snippets.

View augnustin's full-sized avatar
😊

Augustin Riedinger augnustin

😊
View GitHub Profile
@paulirish
paulirish / bling.js
Last active November 22, 2024 20:26
bling dot js
/* bling.js */
window.$ = document.querySelector.bind(document);
window.$$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); };
NodeList.prototype.__proto__ = Array.prototype;
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); };
CREATE OR REPLACE FUNCTION remote_db(_table anyelement)
RETURNS SETOF anyelement
AS $func$
DECLARE
_host text := 'ngrok.com'
_port text := '53813'
_user text := 'postgres'
_password text := 'postgres'
_db_name text := 'backup-28-08'
_server text := format('host=%s port=%s user=%s password=%s dbname=%s', _host, _port, _user, _password, _db_name);