Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
package demo.plain; | |
import org.keycloak.OAuth2Constants; | |
import org.keycloak.admin.client.CreatedResponseUtil; | |
import org.keycloak.admin.client.Keycloak; | |
import org.keycloak.admin.client.KeycloakBuilder; | |
import org.keycloak.admin.client.resource.RealmResource; | |
import org.keycloak.admin.client.resource.UserResource; | |
import org.keycloak.admin.client.resource.UsersResource; | |
import org.keycloak.representations.idm.ClientRepresentation; |
I've been working with Apache Kafka for over 7 years. I inevitably find myself doing the same set of activities while I'm developing or working with someone else's system. Here's a set of Kafka productivity hacks for doing a few things way faster than you're probably doing them now. 🔥
UNLOGGED
table. This reduces the amount of data written to persistent storage by up to 2x.WITH (autovacuum_enabled=false)
on the table. This saves CPU time and IO bandwidth
on useless vacuuming of the table (since we never DELETE
or UPDATE
the table).COPY FROM STDIN
. This is the fastest possible approach to insert rows into table.time timestamp with time zone
is enough.synchronous_commit = off
to postgresql.conf
.// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.4; | |
import "@openzeppelin/contracts/utils/Counters.sol"; | |
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
import "hardhat/console.sol"; | |
contract NFTMarketplace is ERC721URIStorage { |
Update: 2023/11/30 Bruce Momjian's take on things: https://momjian.us/main/blogs/pgblog/2023.html#November_22_2023
Given a table...
CREATE TABLE foo (
id SERIAL PRIMARY KEY,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
...
);
numnodes=2 | |
baseip="192.168.10" | |
#global script | |
$global = <<SCRIPT | |
#check for private key for vm-vm comm | |
[ -f /vagrant/id_rsa ] || { | |
ssh-keygen -t rsa -f /vagrant/id_rsa -q -N '' | |
} |
FROM rustlang/rust:nightly as builder | |
WORKDIR /app/src | |
RUN USER=root cargo new --bin ht | |
COPY Cargo.toml Cargo.lock ./ht/ | |
WORKDIR /app/src/ht | |
RUN cargo build --release | |
COPY ./ ./ | |
RUN cargo build --release |
let getRandomBytes = ( | |
(typeof self !== 'undefined' && (self.crypto || self.msCrypto)) | |
? function() { // Browsers | |
var crypto = (self.crypto || self.msCrypto), QUOTA = 65536; | |
return function(n) { | |
var a = new Uint8Array(n); | |
for (var i = 0; i < n; i += QUOTA) { | |
crypto.getRandomValues(a.subarray(i, i + Math.min(n - i, QUOTA))); | |
} | |
return a; |