Skip to content

Instantly share code, notes, and snippets.

View mavaddat's full-sized avatar
🏠
Working from home

Mavaddat Javid mavaddat

🏠
Working from home
View GitHub Profile

Registering an Application to a URI Scheme

  • Article
  • 07/13/2016
  • 5 minutes to read

The About Asynchronous Pluggable Protocols article describes how to develop handlers for Uniform Resource Identifier (URI) schemes. In some cases, it may be desirable to invoke another application to handle a custom URI scheme. To do so, register the existing application as a URI pluggable protocol handler and associate it with the custom URI scheme. Once the application has successfully launched, it can use command-line parameters to retrieve the URI that launched it. These settings apply to pluggable protocol handlers launched from within Windows Internet Explorer and from Windows Explorer using the Run... command (Windows logo key

function Get-ConsoleAsHTML
{
[CmdletBinding()]
param (
)
#
# The script captures console screen buffer up to the current cursor position and returns it in HTML format.
#
@mavaddat
mavaddat / cue_to_mp3.py
Last active August 11, 2022 05:25 — forked from bancek/cue_to_mp3.py
CUE splitter using ffmpeg (to mp3)
from slugify import slugify
cue_file = r'''C:/Users/mavad/Downloads/Philip Glass - Akhnaten/CD1/Philip Glass - Akhnaten (CD1).cue'''
d = open(cue_file).read().splitlines()
general = {}
tracks = []
current_file = None
@mavaddat
mavaddat / fish_greeting.fish
Last active November 6, 2022 02:43 — forked from dan-c-underwood/fish_greeting.fish
Custom fish greeting (for fish shell)
function fish_greeting
echo ' '(set_color F00)'___
___======____='(set_color FF7F00)'-'(set_color FF0)'-'(set_color FF7F00)'-='(set_color F00)')
/T \_'(set_color FF0)'--='(set_color FF7F00)'=='(set_color F00)') '(set_color red)(whoami)'@'(hostname)'
[ \ '(set_color FF7F00)'('(set_color FF0)'0'(set_color FF7F00)') '(set_color F00)'\~ \_'(set_color FF0)'-='(set_color FF7F00)'='(set_color F00)')'(set_color yellow)' Uptime: '(set_color white)(uptime | sed 's/.*up \([^,]*\), .*/\1/')(set_color red)'
\ / )J'(set_color FF7F00)'~~ \\'(set_color FF0)'-='(set_color F00)') IP Address: '(set_color white)(hostname -I)(set_color red)'
\\\\___/ )JJ'(set_color FF7F00)'~'(set_color FF0)'~~ '(set_color F00)'\) '(set_color yellow)'Version: '(set_color white)(echo $FISH_VERSION)(set_color red)'
\_____/JJJ'(set_color FF7F00)'~~'(set_color FF0)'~~ '(set_color F00)'\\
'(set_color FF7F00)'/ '(set_color FF0)'\ '(set_color FF0)', \\'(set_color F00)'J'(set_color
@mavaddat
mavaddat / download.sh
Last active December 25, 2022 23:49 — forked from mildred/download.sh
Download http://www.ghaemmagham.net/ from archive.org Wayback Machine
#!/bin/bash
url=http://www.ghaemmagham.net/
webarchive=https://web.archive.org
wget="wget -e robots=off -nv"
tab="$(printf '\t')"
additional_url=url.list
# Construct listing.txt from url.list
# The list of archived pages, including some wildcard url
@mavaddat
mavaddat / Part1-ConvertTo-ClassDefinition.ps1
Created May 30, 2023 13:35 — forked from thedavecarroll/Part1-ConvertTo-ClassDefinition.ps1
Creating a Class Definition from an Existing Object - Ironscripter Challenge
#Requires -Version 5.1
function ConvertTo-ClassDefinition {
param(
[Parameter(Position = 0, Mandatory, ValueFromPipeline)]
[object]$Object,
[ValidateNotNullOrEmpty()]
[string]$ClassName,