Skip to content

Instantly share code, notes, and snippets.

@svex99
svex99 / data-table.svelte
Created April 20, 2024 08:23
Svelte data-table with generics and back-end pagination (shadcn-svelte)
<script context="module" lang="ts">
export type Column<T> = {
accessor: keyof T;
header: string;
format?(item: T): string;
cell?: (item: T) => any;
};
</script>
<script lang="ts" generics="T extends { id: string }">
@sailKiteV
sailKiteV / Obsidian_KCCuJa4T0o.gif
Last active April 21, 2023 14:04
A rather inelegant—but functional!—attempt at providing a callout-based, pure CSS implementation of in-leaf tabs for Obsidian.md
Obsidian_KCCuJa4T0o.gif
@mortenbekditlevsen
mortenbekditlevsen / UIDevice+DetectBlur.h
Last active February 23, 2017 16:35
Detecting whether or not the UIVisualEffectView is available and supports the UIBlurEffect
//
// UIDevice+DetectBlur.h
// BlurTest
//
// Created by Morten Ditlevsen on 28/01/15.
// Copyright (c) 2015 Mojo Apps. All rights reserved.
//
#import <UIKit/UIKit.h>
@ericallam
ericallam / AppDelegate.m
Created May 22, 2014 14:49
Interactive Animated Transition Example
//
// AppDelegate.m
// AnimationExamplesiPhone
//
// Created by Eric Allam on 10/05/2014.
#import "AppDelegate.h"
#pragma mark - UIColor Additions
@vcalfa
vcalfa / wkhtmltopdf.tablesplit.js
Created September 20, 2012 11:30 — forked from niflostancu/wkhtmltopdf.tablesplit.js
WkHtmlToPdf Table Splitting Hack
/**
* WkHtmlToPdf table splitting hack.
*
* Script to automatically split multiple-pages-spanning HTML tables for PDF
* generation using webkit.
*
* To use, you must adjust pdfPage object's contents to reflect your PDF's
* page format.
* The tables you want to be automatically splitted when the page ends must
* have a class name of "splitForPrint" (can be changed).