Skip to content

Instantly share code, notes, and snippets.

View jafin's full-sized avatar
🏠
Brisbane, AU

Jason Finch jafin

🏠
Brisbane, AU
  • Brisbane, Australia
  • 16:33 (UTC +10:00)
View GitHub Profile
@jafin
jafin / slack-ui.js
Created September 7, 2023 00:58
Piss off the tab rail in the new slack browser (doesnt work in FF due to CSP)
// ==UserScript==
// @name Piss off the tab rail bar
// @namespace Violentmonkey Scripts
// @match https://app.slack.com/client/*
// @grant GM_addStyle
// @version 1.0
// @author spacepants
// @description 07/09/2023, 10:24:39
// ==/UserScript==
@jafin
jafin / yaml
Created January 27, 2022 14:13
Firefly-iii API 1.5.5
openapi: 3.0.0
servers:
- description: Firefly III demo site
url: https://demo.firefly-iii.org
info:
title: Firefly III API v1.5.5
description: |
This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the "Authorize" button to try the API below. This file was last generated on 2022-01-26T17:41:44+11:00
version: "1.5.5"
contact:
@jafin
jafin / FocusOnRouteChange.tsx
Last active August 25, 2020 02:56
FocusOnRouteChange for React Router -- code adapted from https://github.com/ReactTraining/react-router/issues/5210 . Support Focus Accessibility on route navigation changes
import React, { useRef, useEffect } from 'react';
import { useHistory } from 'react-router-dom';
let prevPathName: string | null = null;
export const FocusOnRouteChange: React.FC = ({ children }) => {
const history = useHistory();
const ref = useRef<HTMLDivElement>(null);
@jafin
jafin / TSQL-to-POCO
Last active April 29, 2020 04:08 — forked from joey-qc/TSQL-to-POCO
A simple TSQL script to quickly generate c# POCO classes from SQL Server tables and views. You may tweak the output as needed. Not all datatypes are represented but this should save a bunch of boilerplate coding. USAGE: Run this query against the database of your choice. The script will loop through tables, views and their respective columns. Re…
declare @tableName varchar(200)
declare @columnName varchar(200)
declare @nullable varchar(50)
declare @datatype varchar(50)
declare @maxlen int
declare @pos int
declare @Stype varchar(50)
declare @isnullable varchar(1)
declare @Sproperty varchar(200)