Skip to content

Instantly share code, notes, and snippets.

View AshV's full-sized avatar
🌴
Coding @ Maldives Beaches

Ashish Vishwakarma AshV

🌴
Coding @ Maldives Beaches
View GitHub Profile
@kimerran
kimerran / Succinctly_dl.cs
Created July 7, 2014 08:34
download FREE ebooks
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using c = System.Console;
using System.IO;
using System.Net;
namespace StretchUtak
{
class Program
using System;
using System.IO;
using System.Net;
using System.Text;
using System.Collections.Generic;
public class SSEvent {
public string Name { get; set; }
public string Data { get; set; }
@fekberg
fekberg / SOS_Morse.cs
Created December 12, 2013 02:16
Here's how you do SOS Morse Code in C#.
var sequence = Enumerable.Range(0, 3).ToList();
while(true) {
sequence.ForEach(e => Console.Beep(650, 100));
Thread.Sleep(200);
sequence.ForEach(e => Console.Beep(650, 400));
Thread.Sleep(200);
@iwek
iwek / csv-to-json.js
Last active April 24, 2024 19:05
CSV to JSON Conversion in JavaScript
//var csv is the CSV file with headers
function csvJSON(csv){
var lines=csv.split("\n");
var result = [];
var headers=lines[0].split(",");
for(var i=1;i<lines.length;i++){
@alisonailea
alisonailea / Client-side full-text search in CSS
Created September 11, 2013 18:18
Client-side full-text search in CSS Using data- attributes for indexation, and a dynamic stylesheet with a CSS3 selector for search, it is straightforward to implement a client-side full-text search in CSS rather than JavaScript.
Reference:
Created by Redo The Web
http://redotheweb.com/2013/05/15/client-side-full-text-search-in-css.html
@anth-3
anth-3 / passThruProxy.cs
Last active April 24, 2019 11:18
Defines a simple pass-through proxy interface for C#.NET (IIS) Server applications and web sites.
<%@ WebHandler Language="C#" Class="PassThruProxy" Debug="true" %>
using System;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Web;
/**
* <summary><c>PassThruProxy</c> is a simple pass-through proxy interface for C#.NET (IIS Servers).</summary>
@willurd
willurd / web-servers.md
Last active May 30, 2024 02:54
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@dynajoe
dynajoe / Program.cs
Created November 1, 2012 16:06
Example C# HTTP Server
using System;
using System.Net;
using System.Text;
using System.Threading;
namespace ExampleSimpleWebserver
{
class Program
{
static void Main (string[] args)
@zziuni
zziuni / stuns
Created September 18, 2012 08:05
STUN server list
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net
@aliostad
aliostad / gist:3202814
Created July 30, 2012 00:18
Serialisation and deserialisation of HTTP request and response messages in ASP.NET Web API
public interface IHttpMessageSerializer
{
void Serialize(HttpResponseMessage response, Stream stream);
void Serialize(HttpRequestMessage request, Stream stream);
HttpResponseMessage DeserializeToResponse(Stream stream);
HttpRequestMessage DeserializeToRequest(Stream stream);
}
public class MessageContentHttpMessageSerializer : IHttpMessageSerializer