Skip to content

Instantly share code, notes, and snippets.

@dev-thinks
dev-thinks / OneDrivePsTools.ps1
Created June 25, 2024 13:24 — forked from dindoliboon/OneDrivePsTools.ps1
Upload large files to OneDrive Personal
<#
Created this a few years ago to upload large files to OneDrive Personal.
Uses BITSAdmin (this is deprecated) to set the bearer token in the header.
OneDrive API at the time did not support uploading large files. Script will
need to be updated to use https://dev.onedrive.com/items/upload_large_files.htm#create-an-upload-session
Tested on Windows 10, PowerShell 5.0.10240.16384.
@dev-thinks
dev-thinks / NewmanCustomHTMLReport.hbs
Created June 10, 2024 01:53 — forked from DannyDainton/NewmanCustomHTMLReport.hbs
The is a custom HTML Report template that can be used with the Postman Newman Collection Runner
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Postman - Reports</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript">
//custom script
@dev-thinks
dev-thinks / angular_auto_complete_disable.ts
Created October 12, 2022 17:19
angular auto complete disable
import { Directive, ElementRef } from '@angular/core';
@Directive({
selector: '[autocompleteOff]'
})
export class AutocompleteOffDirective {
constructor(private _el: ElementRef) {
let w: any = window;
let isChrome = w.chrome;
if (isChrome) {
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
@dev-thinks
dev-thinks / AllowTLS12.cs
Created May 20, 2020 02:33
Enabling TLS1.2 protocol and also ignoring the certificate validation errors
// Enabling TLS1.2 protocol and also ignoring the certificate validation errors
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, error) => true;