Skip to content

Instantly share code, notes, and snippets.

@pedrovasconcellos
pedrovasconcellos / RestSharpWithPollyExample.cs
Last active March 8, 2024 03:57
Example using restsharp with polly
using Polly;
using RestSharp;
using System;
using System.Collections.Generic;
using System.Net;
using System.Text.Encodings.Web;
using System.Text.Json;
using System.Threading.Tasks;
namespace RestSharpWithPolly
@darvell
darvell / add_node_exceptions.ps1
Created October 23, 2017 00:20
Adds useful exceptions to Windows Defender for node.js developers.
If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(`
[Security.Principal.WindowsBuiltInRole] "Administrator"))
{
Write-Warning "You do not have Administrator rights to run this script!`nPlease re-run this script as an Administrator!"
Break
}
Write-Host "Excluding appdata NPM folder and Node.JS install folder from Windows Defender."
Add-MpPreference -ExclusionPath ([System.Environment]::ExpandEnvironmentVariables("%APPDATA%\npm\"))
Add-MpPreference -ExclusionPath (Get-ItemProperty "HKLM:SOFTWARE\Node.js" | Select-Object -Property InstallPath)
@mistic100
mistic100 / Mediakeys.ahk
Last active June 3, 2024 19:36
Media keys shortcuts for AutoHotkey
; AutoHotkey Media Keys
^!Space::Send {Media_Play_Pause}
^!Left::Send {Media_Prev}
^!Right::Send {Media_Next}
^!NumpadMult::Send {Volume_Mute}
^!NumpadAdd::Send {Volume_Up}
^!NumpadSub::Send {Volume_Down}
@ygotthilf
ygotthilf / jwtRS256.sh
Last active July 5, 2024 12:01
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@magnetikonline
magnetikonline / README.md
Last active June 5, 2024 01:05
NSSM - the Non-Sucking Service Manager cheatsheet.