Skip to content

Instantly share code, notes, and snippets.

View anuraj's full-sized avatar
🏠
Working from home

Anuraj anuraj

🏠
Working from home
View GitHub Profile
<#@ template debug="false" hostspecific="true" language="C#" #>
<#@ assembly name="System.Core" #>
<#@ assembly name="System.Xml" #>
<#@ assembly name="System.IO" #>
<#@ assembly name="System.Data" #>
<#@ assembly name="System.Configuration" #>
<#@ assembly name="Microsoft.SqlServer.ConnectionInfo" #>
<#@ assembly name="Microsoft.SqlServer.Smo" #>
<#@ assembly name="Microsoft.SqlServer.Management.Sdk.Sfc" #>
@anuraj
anuraj / kmonitor
Last active August 29, 2015 14:15
using System;
using System.Diagnostics;
using System.IO;
namespace kmonitor
{
class Program
{
private static DateTime _lastRead = DateTime.MinValue;
@anuraj
anuraj / autocomplete.aspx
Created August 27, 2015 11:42
JQuery Autocomplete with Ajax using ASP.NET Web Methods
<%@ Page Language="C#" AutoEventWireup="true" %>
<script runat="server">
[System.Web.Services.WebMethod]
public static string[] GetData(string q)
{
var result = new[] { @"ActionScript", "AppleScript", "Asp", "BASIC", "C", "C++",
"Clojure", "COBOL", "ColdFusion", "Erlang","Fortran", "Groovy","Haskell",
"Java", "JavaScript", "Lisp", "Perl", "PHP", "Python","Ruby", "Scala", "Scheme" };
using System;
using System.Text;
using System.IO;
using System.Net.Sockets;
using System.Net;
using System.Web.Mail;
namespace mySMTP
{
/// <summary>
/*! blanket - v1.1.9 */
if (typeof QUnit !== 'undefined'){ QUnit.config.autostart = false; }
(function(define){
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.acorn = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
// The main exported interface (under `self.acorn` when in the
@{
ViewBag.Title = "Index";
}
<div class="gridster">
<ul>
@*<li id="widget1" data-row="1" data-col="1" data-sizex="1" data-sizey="1"></li>
<li id="widget2" data-row="2" data-col="1" data-sizex="1" data-sizey="1"></li>
<li id="widget3" data-row="3" data-col="1" data-sizex="1" data-sizey="1"></li>
@anuraj
anuraj / Client.cs
Created June 17, 2016 08:21
Web socket example in ASP.NET Core
@{
ViewBag.Title = "Chat";
}
<input id="txtMessage" style="width:40%" />
<input id="cmdSend" type="button" value="Send" />
<input id="cmdLeave" type="button" value="Log out" />
<br />
@anuraj
anuraj / Startup.cs
Created September 10, 2016 02:24
WebSocket middleware example
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using WebApp2.Middlewares;
@anuraj
anuraj / winservice.iss
Created January 28, 2017 09:01
Innosetup script file for dotnet core windows service installation
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "dotnet core windows service"
#define MyAppVersion "1.5"
#define MyAppPublisher "dotnetthoughts"
#define MyAppURL "http://dotnetthoughts.net/"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
<h1>This is a view component</h1>
<!--
Make sure the path is correct, Views > Shared > Components > [Component Name] > Default.cshtml
SampleApp2\Views\Shared\Components\HelloWorld\Default.cshtml
-->