Skip to content

Instantly share code, notes, and snippets.

@jekcom
jekcom / Postgres2C#Class
Last active March 10, 2024 15:05 — forked from PaulDMendoza/Postgres2C#Class
Postgresql table to C# class converter
SELECT 'public ' || CASE
WHEN data_type = 'uuid' THEN 'Guid'
WHEN data_type = 'text' THEN 'string'
WHEN data_type = 'character varying' THEN 'string'
WHEN data_type = 'character' THEN 'string'
WHEN data_type = 'double precision' THEN 'double'
WHEN data_type = 'json' THEN 'string'
WHEN data_type = 'integer' THEN 'int'
WHEN data_type = 'boolean' THEN 'bool'
WHEN data_type = 'bigint' THEN 'long'
@jekcom
jekcom / ssh-tunnel.ps1
Created September 19, 2023 15:59 — forked from tohuuuuu/ssh-tunnel.ps1
Powershell command to create a SSH tunnel
start-process -NoNewWindow powershell `
{ssh -f <user>@<host> `
-L 10443:127.0.0.1:443 `
-N }
@jekcom
jekcom / redux-actions.ts
Created April 28, 2020 08:23 — forked from milankorsos/redux-actions.ts
Correct TypeScript typing example for Redux Thunk actions
import {Action, ActionCreator, Dispatch} from 'redux';
import {ThunkAction} from 'redux-thunk';
// Redux action
const reduxAction: ActionCreator<Action> = (text: string) => {
return {
type: SET_TEXT,
text
};
};