Skip to content

Instantly share code, notes, and snippets.

@MHaggis
MHaggis / handlers
Created June 2, 2022 19:06
Get-Item Registry::HKEY_CLASSES_ROOT\* | Select-Object "Property","PSChildName" | Where-Object -Property Property -Match "^URL*" | Export-Csv -path c:\temp\url_all.csv
bingmaps
calculator
callto
conf
DLNA-PLAYSINGLE
Explorer.AssocActionId.BurnSelection
Explorer.AssocActionId.EraseDisc
Explorer.AssocActionId.ZipSelection
Explorer.AssocProtocol.search-ms
Explorer.BurnSelection
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
#!/bin/bash
set -e -o errexit -o pipefail -o nounset
###################################
# This script can be used by itself, but it's recommended that you read
# a tutorial on Proxmox forum first: https://forum.proxmox.com/threads/hey-proxmox-community-lets-talk-about-resources-isolation.124256/
###################################
# Do not modify these variables (set by Proxmox when calling the script)
vmId="$1"
@0xjac
0xjac / private_fork.md
Last active March 29, 2024 02:23
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@fabiolimace
fabiolimace / UUIDv6.sql
Last active March 29, 2024 02:23
Functions for generating UUIDv6 and UUIDv7 on PostgreSQL
/*
* MIT License
*
* Copyright (c) 2023-2024 Fabio Lima
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@wdolek
wdolek / ConsoleApp153.csproj
Created March 27, 2024 08:42
Proof that AutoMapper can be slower than your own manually written code
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
@caercam
caercam / functions.php
Created June 22, 2016 07:06
Add 'MKV' and 'MP4' to supported WPMovieLibrary media types
<?php
/**
* Add new movie medias
*
* @param array Exisiting media
*
* @return array Updated media
*/
function wpmoly_add_new_media_type( $media ) {
@olih
olih / jq-cheetsheet.md
Last active March 29, 2024 02:19
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@lohhans
lohhans / README-PTBR.md
Last active March 29, 2024 02:18 — forked from PurpleBooth/README-Template.md
Um modelo para fazer um bom README.md

Título do projeto

Um parágrafo da descrição do projeto vai aqui

🚀 Começando

Essas instruções permitirão que você obtenha uma cópia do projeto em operação na sua máquina local para fins de desenvolvimento e teste.

Consulte Implantação para saber como implantar o projeto.

@MarcoEidinger
MarcoEidinger / findRequiredReasonAPIUsage.sh
Created August 21, 2023 19:55
A shell script to find if any "required reason API" are used in Swift or Objective-C files within that folder or subfolders
#!/bin/bash
# https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api
searchTerms=(
# File timestamp APIs
"creationDate"
"modificationDate"
"fileModificationDate"
"contentModificationDateKey"
"creationDateKey"