Skip to content

Instantly share code, notes, and snippets.

View rer145's full-sized avatar

Ron Richardson rer145

View GitHub Profile
@m-jovanovic
m-jovanovic / Result.cs
Created September 7, 2023 08:03
Result type
public class Result
{
protected internal Result(bool isSuccess, Error error)
{
if (isSuccess && error != Error.None)
{
throw new InvalidOperationException();
}
if (!isSuccess && error == Error.None)
@akatakritos
akatakritos / create-aspnet-core-identity-schema.sql
Created June 5, 2018 03:19
Script to create the ASPNET core Identity tables
USE [HobbyDB]
GO
/****** Object: Table [dbo].[AspNetRoleClaims] Script Date: 6/4/2018 10:18:03 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[AspNetRoleClaims]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[AspNetRoleClaims](
@balpha
balpha / Program.cs
Created May 4, 2016 12:46
Job title and company name generator
using System;
using System.Linq;
namespace FakeJobInfo
{
class Program
{
private static Func<int, int> rand = new Random().Next;
@brendansudol
brendansudol / colorz.js
Created July 14, 2013 17:25
A D3.js recreation of Etsy's shopping by color animation.
var width = 660,
height = 600;
var color = d3.scale.linear()
.domain([0, width/4, width/4 * 2, width/4 * 3, width])
.range(["#fb000f", "#6e00fb", "#00fbec", "#8dfb00", "#fb3c00"])
.interpolate(d3.interpolateHsl);
var svg = d3.select("#colorz").append("svg")
.attr("width", width)
@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………