Skip to content

Instantly share code, notes, and snippets.

View dterracino's full-sized avatar
💻
Vibe coding...

David Terracino dterracino

💻
Vibe coding...
  • Disabled
  • Middletown, NY
View GitHub Profile
using System.Collections.Generic;
namespace FollowMyBuild.Web.Models.ViewModels.Portable {
public class PortableRecursiveComment {
public PortableRecursiveComment() {
Comments = new List<PortableComment>();
}
public int Id { get; set; }
public IEnumerable<PortableComment> Comments { get; set; }
}
The cat was seen as a sacred animial in ancient Eqypt, and the history of domestic cats dates back to as early as 8000 years.
The biggest breed of domesticated cats are called a Maine Coon cat and weighs up to 11 kg.
Cats are some of the smartest animals and can interpret a human's mood and feelings.
The average cat sleeps between 12-14 hours a day.
Cats paw (repeatedly treading on a spot - often it's owner) to mark their territory. Cats sweat through the bottom of their paws and rub this off as a marking mechanism.
White cats with blue eyes are quite often born deaf.
Cat urine glows in the dark if a black light is shined on it. This is a good way to detect cat urine in your home.
Cats have 220^0 field of view where humans only have 180^0.
Cats' sense of smell is 14 times stronger than that of humans.
Cats have 30 permanent teeth, while adult humans have 32.
@davecowart
davecowart / Repository.cs
Created March 28, 2012 18:24
Dapper Repository
using System;
using System.Collections.Generic;
using System.Linq;
using Dapper;
namespace Example.Data.Dapper {
public class MessageRepository : RepositoryBase, IMessageRepository {
/// <summary>
/// Gets a single message
/// </summary>
@tomtung
tomtung / Rfc822DateTimeParser.cs
Created April 13, 2012 15:49
Rfc822DateTimeParser - Parse Date-Time In RFC-822 Format
//* ------------------------------------------------------------------------
//* Rfc822DateTimeParser - Parse Date-Time In RFC-822 Format
//* Copyright (C) 2009 Tom Dong
//*
//* This library is free software; you can redistribute it and/or
//* modify it under the terms of the GNU Lesser General Public
//* License as published by the Free Software Foundation; either
//* version 2.1 of the License, or (at your option) any later version.
//* ------------------------------------------------------------------------
@josheinstein
josheinstein / LINQ.psd1
Created April 30, 2012 16:29
LINQ-ish Cmdlets for PowerShell
@{
# MODULE
Description = 'LINQ for PowerShell'
ModuleVersion = '3.0'
GUID = '03BDA80F-0831-406E-B6AE-59E32D73F190'
# AUTHOR
Author = 'Josh Einstein'
CompanyName = 'Einstein Technologies'
@BrockA
BrockA / waitForKeyElements.js
Created May 7, 2012 04:21
A utility function, for Greasemonkey scripts, that detects and handles AJAXed content.
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
@davecowart
davecowart / TapExtension.cs
Created June 22, 2012 18:02
C# implementation of Ruby's tap method
public static class TapExtension {
public static T Tap<T>(this T obj, Action<T> block) {
block.Invoke(obj);
return obj;
}
}
@DavidBasarab
DavidBasarab / AutoGenerateCRUD.sql
Created August 1, 2012 03:16
Autogenerate CRUD procedures for a database.
-- #########################################################
-- Author: www.sqlbook.com
-- Copyright: (c) www.sqlbook.com. You are free to use and redistribute
-- this script as long as this comments section with the
-- author and copyright details are not altered.
-- Purpose: For a specified user defined table (or all user defined
-- tables) in the database this script generates 4 Stored
-- Procedure definitions with different Procedure name
-- suffixes:
-- 1) List all records in the table (suffix of _lst)
@jonathanconway
jonathanconway / TypeExtensions.IsSimpleType.cs
Created August 12, 2012 08:09
Determine whether a type is simple.
public static class TypeExtensions
{
/// <summary>
/// Determine whether a type is simple (String, Decimal, DateTime, etc)
/// or complex (i.e. custom class with public properties and methods).
/// </summary>
/// <see cref="http://stackoverflow.com/questions/2442534/how-to-test-if-type-is-primitive"/>
public static bool IsSimpleType(
this Type type)
{
@davecowart
davecowart / S3FileSystem.cs
Created August 31, 2012 20:13
S3 Implementation of IFileSystem for N2CMS
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using Amazon;
using Amazon.S3;
using Amazon.S3.Model;
using N2.Engine;