Skip to content

Instantly share code, notes, and snippets.

View MrClan's full-sized avatar

Intentionally Clandestine MrClan

View GitHub Profile
@MrClan
MrClan / Enable POST_DELETE methods in IIS
Created September 7, 2020 14:16
Enable POST and DELETE http methods via web.config in IIS hosting a asp.net core web app
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<modules>
<remove name="WebDAVModule" />
</modules>
<handlers>
<remove name="aspNetCore" />
<remove name="WebDAV" />
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
@MrClan
MrClan / ExtendedEntry.cs
Created July 29, 2020 01:45 — forked from rhishikeshj/ExtendedEntry.cs
How to debounce an Entry control in Xamarin
private Task _debounceTask;
public ExtendedEntry()
{
int debounceDelay = 500;
CancellationTokenSource _debounceTaskCancellationSource = null;
TextChanged += (sender, e) =>
{
if (_debounceTask != null)
{
@MrClan
MrClan / VS16NoTelem.bat
Created July 28, 2020 20:08
Disable telemetry in Visual Studio 2019
@echo off
fltmc >nul 2>&1 || (
echo This batch script requires administrator privileges. Right-click on
echo the script and select "Run as administrator".
goto :die
)
rem Change this path if you are using Community or Professional editions
set "VS_INSTALL_DIR=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise"
@MrClan
MrClan / AlgoTopics.md
Last active April 30, 2020 00:10
Algo Preparation Topics
  1. Arrays
  2. Searching
  3. Sorting
  4. Matrix
  5. Hashing
  6. Strings
  7. Linked List
  8. Stack
  9. Queue
@MrClan
MrClan / PBFeatureList.md
Last active April 28, 2020 07:12
PB Feature List

Photo Viewing Page

- comments
	- add/edit/delete
	- upvote/downvote
- 

#User

- browse photos
@MrClan
MrClan / youtube-dl.md
Created October 26, 2019 06:21
Using youtube-dl to download courses from Pluralsight

Download courses from learning sites with youtube-dl

You can download whole courses from an array of tutorial sites with the CLI tool youtube-dl. In the example further down I'm using my Pluralsight account to get videos from a course at their site. Here is a list of all supported sites that you can download from with this tool

The flags you have to supply may vary depending on which site you make a request to.

You can get a free 3 month trial to Pluralsight by signing up for free to Visual Studio Dev Essentials

Installation

@MrClan
MrClan / AdbCommands
Last active October 3, 2024 17:37 — forked from Pulimet/AdbCommands
Adb useful commands list
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell
using System;
using System.IO;
using System.Drawing;
using System.Drawing.Imaging;
using System.Diagnostics;
using System.Linq;
namespace ImageProcessing
{
class Program
@MrClan
MrClan / git-pushing-multiple.rst
Created June 21, 2018 12:57 — forked from rvl/git-pushing-multiple.rst
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

@MrClan
MrClan / TSQL-to-POCO
Created April 2, 2018 16:29 — forked from joey-qc/TSQL-to-POCO
A simple TSQL script to quickly generate c# POCO classes from SQL Server tables and views. You may tweak the output as needed. Not all datatypes are represented but this should save a bunch of boilerplate coding. USAGE: Run this query against the database of your choice. The script will loop through tables, views and their respective columns. Re…
declare @tableName varchar(200)
declare @columnName varchar(200)
declare @nullable varchar(50)
declare @datatype varchar(50)
declare @maxlen int
declare @sType varchar(50)
declare @sProperty varchar(200)
DECLARE table_cursor CURSOR FOR