Skip to content

Instantly share code, notes, and snippets.

View deepumi's full-sized avatar
🎯
Focusing

Deepu Madhusoodanan deepumi

🎯
Focusing
View GitHub Profile
@davidfowl
davidfowl / FromSqlInterpolatedStringHandler.cs
Last active July 3, 2023 12:55
Implementation of parameterized sql queries using string interpolation handlers
using System.Data.Common;
using System.Runtime.CompilerServices;
using System.Text;
using Npgsql;
GetCatalogItemsSql(null, null, null, 10);
void GetCatalogItemsSql(int? catalogBrandId, int? before, int? after, int pageSize)
{
// This looks like it would be susceptible to SQL injection, but it's not.
@maykonmeier
maykonmeier / NetworkConnection.cs
Created January 17, 2017 13:05
C# Class for creating a network connection using a different network credential
using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Net;
public class NetworkConnection : IDisposable
{
readonly string _networkName;
public NetworkConnection(string networkName, NetworkCredential credentials)
@denji
denji / http-benchmark.md
Last active April 23, 2024 02:05
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)
@joyrexus
joyrexus / README.md
Last active February 19, 2024 17:15 — forked from liamcurry/gist:2597326
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@pitch-gist
pitch-gist / gist:2999707
Created June 26, 2012 22:21
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>