Skip to content

Instantly share code, notes, and snippets.

View swissarmykirpan's full-sized avatar

Gurpreet Singh Sohal swissarmykirpan

View GitHub Profile
@swissarmykirpan
swissarmykirpan / Function1.cs
Last active June 26, 2022 23:30
Generate SAS Token for Blob
using System;
using System.IO;
using System.Net;
using System.Threading.Tasks;
using Azure;
using Azure.Storage.Blobs;
using Azure.Storage.Blobs.Models;
using Azure.Storage.Sas;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

Keybase proof

I hereby claim:

  • I am swissarmykirpan on github.
  • I am swissarmykirpan (https://keybase.io/swissarmykirpan) on keybase.
  • I have a public key whose fingerprint is 0BAA 657E E97F 8722 4156 4DA5 54E4 09DB 0637 C5FE

To claim this, I am signing this object:

@swissarmykirpan
swissarmykirpan / Windows10-Setup.ps1
Created January 5, 2018 18:58 — forked from NickCraver/Windows10-Setup.ps1
(In Progress) PowerShell Script I use to customize my machines in the same way for privacy, search, UI, etc.
##################
# Privacy Settings
##################
# Privacy: Let apps use my advertising ID: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1
# Privacy: SmartScreen Filter for Store Apps: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0
Date.prototype.toFormattedString = function (f)
{
var nm = this.getMonthName();
var nd = this.getDayName();
f = f.replace(/yyyy/g, this.getFullYear());
f = f.replace(/yy/g, String(this.getFullYear()).substr(2,2));
f = f.replace(/MMM/g, nm.substr(0,3).toUpperCase());
f = f.replace(/Mmm/g, nm.substr(0,3));
f = f.replace(/MM\*/g, nm.toUpperCase());
f = f.replace(/Mm\*/g, nm);