Skip to content

Instantly share code, notes, and snippets.

@mohanpedala
mohanpedala / bash_strict_mode.md
Last active November 28, 2025 09:58
set -e, -u, -o, -x pipefail explanation
CREATE OR REPLACE FUNCTION generate_sequential_uuid(p_interval_length int DEFAULT 60)
RETURNS uuid
LANGUAGE plpgsql
AS $$
DECLARE
v_i int;
v_time bigint;
v_bytes int[16] = '{}';
v_hex text[16] = '{}';
BEGIN
// original from: http://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/
// original gist: https://gist.github.com/willpatera/ee41ae374d3c9839c2d6
function doGet(e){
return handleResponse(e);
}
// Enter sheet name where data is to be written below
var SHEET_NAME = "current";
@BMorearty
BMorearty / ETradeAPI.ts
Created October 17, 2023 20:30
My E*Trade API files
// Partial response types for E*Trade API
// See https://apisb.etrade.com/docs/api/market/api-quote-v1.html
// and https://apisb.etrade.com/docs/api/market/api-market-v1.html
/*
* Quote API
*/
export type Message = {
description: string;