Skip to content

Instantly share code, notes, and snippets.

View vladimir-kazan's full-sized avatar
🎯

Vladimir Kuznetsov vladimir-kazan

🎯
  • Munich, Germany
View GitHub Profile
@vladimir-kazan
vladimir-kazan / zig-0.13.0-builtins.csv
Created August 17, 2024 17:41 — forked from TheSantacloud/zig-0.13.0-builtins.csv
Zig built-ins cheatsheet 0.13.0
@addrSpaceCast(ptr: anytype) anytype Pointer conversion to another address space
@addWithOverflow(a: anytype, b: anytype) struct { @TypeOf(a, b), u1 } Addition with overflow detection
@alignCast(ptr: anytype) anytype Pointer alignment
@alignOf(comptime T: type) comptime_int Alignment for the current target in bytes
@as(comptime T: type, expression) T Safe type coercion
@atomicLoad(comptime T: type, ptr: *const T, comptime ordering: AtomicOrder) T Atomic dereference of pointer
@atomicRmw(comptime T: type, ptr: *T, comptime op: AtomicRmwOp, operand: T, comptime ordering: AtomicOrder) T Atomic modify and return previous value
@atomicStore(comptime T: type, ptr: *T, value: T, comptime ordering: AtomicOrder) void Atomic store of value at address
@bitCast(value: anytype) anytype Type cast at compile time
@bitOffsetOf(comptime T: type, comptime field_name: []const u8) comptime_int Bit offset of field within struct
@vladimir-kazan
vladimir-kazan / MultiTenantProvider.java
Created May 29, 2024 18:47 — forked from dipold/MultiTenantProvider.java
Hibernate 4 Multitenancy with postgresql implementation example
package yourpackage.util.hibernate.multitenancy;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.Map;
import org.hibernate.HibernateException;
import org.hibernate.service.config.spi.ConfigurationService;
import org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider;
import org.hibernate.service.jdbc.connections.spi.MultiTenantConnectionProvider;
@vladimir-kazan
vladimir-kazan / multiple_ssh_setting.md
Created May 14, 2024 22:27 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@vladimir-kazan
vladimir-kazan / UTF-8 table (box) symbols.txt
Created April 29, 2024 11:47 — forked from aaabramov/UTF-8 table (box) symbols.txt
Drawing tables (boxes) using UTF-8 symbols
@vladimir-kazan
vladimir-kazan / .env
Created February 6, 2024 19:04 — forked from degitgitagitya/.env
Next JS + Next Auth + Keycloak + AutoRefreshToken
# KEYCLOAK BASE URL
KEYCLOAK_BASE_URL=
# KEYCLOAK CLIENT SECRET
KEYCLOAK_CLIENT_SECRET=
# KEYCLOAK CLIENT ID
KEYCLOAK_CLIENT_ID=
# BASE URL FOR NEXT AUTH

Conventional Commit Messages

See how a minor change to your commit message style can make a difference. Examples

ℹ️ git-conventional-commits A CLI util to ensure this conventions and generate changelogs

Commit Formats

Default

const express = require('express');
const { html, Component } = require('htm/preact');
const renderToString = require('preact-render-to-string');
class App extends Component {
render(props) {
return html`
<div class="app">
<h1>This is an app</h1>
<p>Current server time: ${new Date + ''}</p>
const express = require('express');
const htm = require('htm');
const vhtml = require('vhtml');
// create an html`` tag function for vhtml:
const html = htm.bind(vhtml);
const App = (props) => html`
<div class="app">
<h1>This is an app</h1>
{"nodes":[{"id":1,"callFrame":{"functionName":"(root)","scriptId":"0","url":"","lineNumber":-1,"columnNumber":-1},"hitCount":0,"children":[2,535,539,540,541,542,740,741,758,878,903,907,913,935]},{"id":2,"callFrame":{"functionName":"run","scriptId":"457","url":"node:internal/modules/esm/module_job","lineNumber":188,"columnNumber":11},"hitCount":0,"children":[3]},{"id":3,"callFrame":{"functionName":"evaluate","scriptId":"0","url":"","lineNumber":-1,"columnNumber":-1},"hitCount":0,"children":[4]},{"id":4,"callFrame":{"functionName":"","scriptId":"475","url":"node:internal/modules/esm/translators","lineNumber":159,"columnNumber":66},"hitCount":0,"children":[5]},{"id":5,"callFrame":{"functionName":"require$$0.Module._load","scriptId":"479","url":"file:///private/tmp/next-app/.pnp.cjs","lineNumber":32556,"columnNumber":36},"hitCount":0,"children":[6]},{"id":6,"callFrame":{"functionName":"Module.load","scriptId":"452","url":"node:internal/modules/cjs/loader","lineNumber":1104,"columnNumber":32},"hitCount":0,"childre
@vladimir-kazan
vladimir-kazan / TerminalVim.scpt
Created September 26, 2023 12:40 — forked from charlietran/TerminalVim.scpt
Open file in iTerm vim for MacOS Sierra
-- TerminalVim.app
-- This creates a shim Application that will enable you to open files from the Finder in vim using iTerm
-- To use this script:
-- 1. Open Automator and create a new Application
-- 2. Add the "Run Applescript" action
-- 3. Paste this script into the Run Applescript section
-- 4. Save the application as TerminalVim.app in your Applications folder
-- 5. In the Finder, right click on a file and select "Open With". In that window you can set TerminalVim as a default