Skip to content

Instantly share code, notes, and snippets.

@MrGrigri
MrGrigri / RemoveOpenWithSublimeText3.bat
Created August 13, 2015 15:42
Remove "Open with Sublime Text 3" context menu in File Explorer for Windows 10
@echo off
@reg delete "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3"
@reg delete "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3"
@reg delete "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command"
@reg delete "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3"
@reg delete "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3"
@reg delete "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3\command"
@peterforgacs
peterforgacs / Windows10AWSEC2.md
Last active August 29, 2024 09:56
Running Windows 10 on AWS EC2

Running Windows 10 on AWS EC2

Downloading the image

Download the windows image you want.

AWS vmimport supported versions: Microsoft Windows 10 (Professional, Enterprise, Education) (US English) (64-bit only)

So Home wont work.

@tobywf
tobywf / clean_old_lambda_versions.py
Last active September 9, 2024 17:50
A quick script to remove old AWS Lambda function versions
from __future__ import absolute_import, print_function, unicode_literals
import boto3
def clean_old_lambda_versions():
client = boto3.client('lambda')
functions = client.list_functions()['Functions']
for function in functions:
versions = client.list_versions_by_function(FunctionName=function['FunctionArn'])['Versions']
for version in versions:
@almeidx
almeidx / markdown-text-101.md
Last active June 2, 2024 19:46 — forked from matthewzring/markdown-text-101.md
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

Sweet Styles

Italics *italics* or _italics_

Underline italics __*underline italics*__

@aleskiontherun
aleskiontherun / pritunl-backup.sh
Last active February 19, 2024 15:31
Backup and restore Pritunl database.
sudo service pritunl stop
mongodump -d pritunl -o pritunl-bkp
tar -czvf pritunl-bkp.tar.gz pritunl-bkp
@arukaen
arukaen / repository-s3-gov-cloud.md
Created November 23, 2021 17:58
Configuring repository-s3 for ElasticSearch/Kibana backups in GovCloud

Introduction

I hope this gist helps someone as it was a bit of a pain for me to get this working (I couldn't find any documentation on it). If you are using respository-s3 on an ElasticSearch cluster in AWS GovCloud, you will not be able to configure the repository because the Kibana UI does not show some of these options. The best way is to do it via cURL / elasticsearch api as follows:

curl -X PUT "localhost:9200/_snapshot/your_bucket_name?pretty" -H 'Content-Type: application/json' -d'
{
  "type": "s3",
  "settings": {
 "bucket": "your_bucket_name",