Skip to content

Instantly share code, notes, and snippets.

View rudiv's full-sized avatar

Rudi Visser rudiv

View GitHub Profile
@rudiv
rudiv / ValuesFromExtension.cs
Last active November 25, 2015 11:40
Copy values from one object to another with inclusion/exclusion list
using System.Linq;
namespace Cedita
{
public static class ModelExtensions
{
/// <summary>
/// Type-safe value copy from one object instance to another.
/// </summary>
/// <example>
@bertybot
bertybot / phone_formatter.ts
Created November 18, 2024 20:49
Svelte Phone Formatter Action With Built In Validation
import type { ActionReturn } from "svelte/action";
import { AsYouType, isValidPhoneNumber } from 'libphonenumber-js/min';
interface Parameter {
countryCode: 'US'
}
export function phone_formatter(node: HTMLInputElement, params: Parameter = { countryCode: 'US' }): ActionReturn<Parameter> {
let value: string[] = []
@emilyliu7321
emilyliu7321 / bluesky-comments.tsx
Created November 25, 2024 05:39
Integrate Bluesky replies as your blog's comment section
"use client";
/* eslint-disable @next/next/no-img-element */
import Link from "next/link";
import { useState, useEffect } from 'react';
import {
AppBskyFeedDefs,
AppBskyFeedPost,
type AppBskyFeedGetPostThread,
} from "@atproto/api";