Skip to content

Instantly share code, notes, and snippets.

View khalidabuhakmeh's full-sized avatar
👻
🚀🧠🥑

Khalid Abuhakmeh khalidabuhakmeh

👻
🚀🧠🥑
View GitHub Profile
@aalmada
aalmada / Deck.cs
Last active June 18, 2021 13:21
Cards deck implemented in C#
#nullable enable
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
namespace NetFabric
{
public class Deck<T>
@MaximRouiller
MaximRouiller / Program.cs
Last active March 27, 2024 22:45
GitHub API access with Personal Access Token using C# HttpClient and .NET Core
public class Program
{
public static void Main(string[] args)
{
Task.WaitAll(ExecuteAsync());
Console.ReadLine();
}
public static async Task ExecuteAsync()
{
@anaisbetts
anaisbetts / AccentColors.cs
Created August 18, 2015 17:54
Render the accent background of a Windows Store-style icon
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;
// https://raw.githubusercontent.com/maxtruxa/AccentColors/master/AccentColors/AccentColor.cs
{ "collection" :
{
"version" : "1.0",
"href" : "http://example.org/movies",
"items" : [
{
"href" : "http://example.org/movie/1",
"data" : [
{"name" : "Title", "value" : "Star Wars"},
{"name" : "Director", "value" : "Lucas"}
@beccasaurus
beccasaurus / README.markdown
Created May 5, 2011 19:37
Adds hooks to jQuery.validate's form/element validation methods (via trigger())

jQuery Validate Hooks

If you're using [ASP.NET MVC3][], it uses [jQuery Validate][] to do client-side validations. Instead of using [jQuery Validate][] directly, however, it wraps it with its own jQuery plugin called [jQuery.Validate.Unobtrusive][]. [jQuery.Validate.Unobtrusive][] sets up [jQuery Validate][] for you, behind the scenes, so you don't have an opportunity to customize your [jQuery Validate][] settings at all!

We've been running into trouble with this when we've been doing our own custom client-side validations. We need a way to integrate with the build-in [ASP.NET MVC3][] validation so we can: