Skip to content

Instantly share code, notes, and snippets.

import {
ContentTypeId,
EncodedContent,
JSContentCodec,
} from "@xmtp/react-native-sdk";
export const ContentTypeTransactionReference: ContentTypeId = {
authorityId: "xmtp.org",
typeId: "transactionReference",
versionMajor: 1,
@lourou
lourou / uuid_generate_v7.sql
Last active July 21, 2023 12:38
Postgres function for UUID v7 generation supporting microsecond precision. Lexicographic sortable, k-sortable, unique/collision-resistant UUIDs.
-- Based off IETF draft, https://datatracker.ietf.org/doc/draft-peabody-dispatch-new-uuid-format/
-- and https://gist.github.com/kjmph/5bd772b2c2df145aa645b837da7eca74
create or replace function uuid_generate_v7()
returns uuid
as $$
declare
unix_ts_ms bytea;
uuid_bytes bytea;
begin
@lourou
lourou / App.js
Created April 19, 2022 14:09 — forked from adilanchian/App.js
Section 5: Update UI + deploy to an Ethereum testnet so anyone on the internet can wave at you using their
import React, { useEffect, useState } from "react";
import { ethers } from "ethers";
import './App.css';
import wavePortal from './utils/WavePortal.json';
const App = () => {
const [currentAccount, setCurrentAccount] = useState("");
const [allWaves, setAllWaves] = useState([]);
const contractAddress = "0xd5f08a0ae197482FA808cE84E00E97d940dBD26E";
tar czf - ./path/to/source | ssh user@host tar xvzfC - /path/to/target
du -h --max-depth=4 * | sort -hr
--
-- Domoticz passes information to scripts through a number of global tables
--
-- otherdevices, otherdevices_lastupdate and otherdevices_svalues are arrays for all devices:
-- otherdevices['yourotherdevicename'] = "On"
-- otherdevices_lastupdate['yourotherdevicename'] = "2015-12-27 14:26:40"
-- otherdevices_svalues['yourotherthermometer'] = string of svalues
--
-- uservariables and uservariables_lastupdate are arrays for all user variables:
-- uservariables['yourvariablename'] = 'Test Value'
@lourou
lourou / el-capitan-developer-clean-install.md
Last active December 28, 2015 11:03 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan – system preferences, nginx, php-fpm, mariadb