Skip to content

Instantly share code, notes, and snippets.

@thatcatcancode
thatcatcancode / IRedirectProcessor.cs
Created October 14, 2012 07:27 — forked from sheastrickland/IRedirectProcessor.cs
Simple server-side solution to jQuery Mobile + Ajax request + Redirect being transparently followed and not updating the data-url / page
public interface IRedirectProcessor
{
string Process(ResultExecutedContext context);
}
@thatcatcancode
thatcatcancode / README-Template.md
Created January 21, 2018 04:40 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@thatcatcancode
thatcatcancode / example-morph.ts
Last active August 4, 2022 16:20
An example of a morph that generates interfaces from classes.
import { Project } from 'ts-morph'
/**
* Get the scope of the NestJS project by specifying its tsconfig.
*/
const project = new Project({
tsConfigFilePath: 'tsconfig.json',
})
/**
@thatcatcancode
thatcatcancode / example-types.ts
Last active August 4, 2022 17:00
Examples of Typescript types
export interface Card {
title: string;
label: string | null;
description: string | null;
action: Action;
}
export interface Action {
title: string;
url: string;
@thatcatcancode
thatcatcancode / mark-special-dates.ts
Last active August 15, 2022 16:53
Code for customizing ngb bootstrap date picker to indicate certain days are "special"
//HTML
<!-- (navigate)="handleNavigate($event)" -->
<!-- <span class="position-absolute" [class.dot]="specialDates && markSpecial(date)"></span> -->
/**
* This is less performant, but actually responds to special dates updating.
* A pipe did not do the trick, used for formatting data not setting classes
* https://github.com/ng-bootstrap/ng-bootstrap/issues/2391
*/