Skip to content

Instantly share code, notes, and snippets.

View punitganshani's full-sized avatar

Puneet Ghanshani punitganshani

View GitHub Profile
@punitganshani
punitganshani / Get-FileEncodingOfFilesInFolder.ps1
Last active August 29, 2015 14:25
Get Encoding of Files [PowerShell]
function Get-FileEncodingOfFilesInFolder
{
[CmdletBinding()] Param (
[Parameter(Mandatory = $True, ValueFromPipelineByPropertyName = $True)] [string]$Path, [string]$pattern
)
$files = Get-ChildItem -path $Path $pattern -Recurse | Select-Object FullName
$encodings = @{}
@punitganshani
punitganshani / WebBackgroundTasks.cs
Created July 18, 2015 14:47
Scheduling Background Tasks in ASP.NET using Quartz
using Quartz;
using Quartz.Impl;
namespace Tasks
{
public class MaintenanceJob : IJob
{
public void Execute(IJobExecutionContext context)
{
var ftpLocation = context.JobDetail.JobDataMap.Get("ftp.location");