Skip to content

Instantly share code, notes, and snippets.

View rabbal's full-sized avatar
🎯
Focusing

Salar Rabbal rabbal

🎯
Focusing
View GitHub Profile
@Danielku15
Danielku15 / Example.html
Created February 25, 2016 19:53
A MediaTypeFormatter for WebApi for multipart/form-data including file uploads
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>File Upload example</title>
<link href="/Content/bootstrap.css" rel="stylesheet" />
</head>
<body>
<form action="api/Upload" method="post">
<div class="form-group">
@AlexanderLindsay
AlexanderLindsay / bootstrap-v4-modal-load.js
Created April 24, 2016 03:04
javascript to load a bootstrap modal content from an anchor tag
// boostrap 4 load modal example from docs
$('#modal-container').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget); // Button that triggered the modal
var url = button.attr("href");
var modal = $(this);
// note that this will replace the content of modal-content ever time the modal is opened
modal.find('.modal-content').load(url);
});
@tolemac
tolemac / StructureMapAOP.cs
Last active May 11, 2020 20:11
AOP using StructureMap + Castle.DynamicProxy
using System;
using System.Collections.Generic;
using StructureMap;
using StructureMap.Building.Interception;
using StructureMap.Pipeline;
namespace AOPStructureMap
{
public interface IAppService
{
@alirezanet
alirezanet / Iran96-97.json
Last active February 5, 2025 21:43
List of provinces, states and cities of Iran with geographical coordinates (96-97 update)
[
{
"latitude": "34° 31' 24.924",
"longitude": "50° 0' 20.866",
"province": "مرکزی",
"state": "آشتیان",
"city": "آشتیان"
},
{
"latitude": "33° 40' 29.197",
@davidfowl
davidfowl / MinimalAPIs.md
Last active March 16, 2025 16:47
Minimal APIs at a glance