Skip to content

Instantly share code, notes, and snippets.

@marckassay
marckassay / 3852.txt
Created March 5, 2019 03:04
Troubleshooting an issue with ionic. Created for this issue: https://github.com/ionic-team/ionic-cli/issues/3852
E:\temp\dsds\jio [master]> ionic serve --verbose
ionic:lib Terminal info: { tty: true, ci: false, windows: true } +0ms
ionic:lib CLI global options: { _: [ 'serve' ], help: null, h: null, verbose: true, quiet: null, interactive: true, color: true, confirm: null, json: null, project: null, '--': [] } +7ms
ionic:lib:project Project type from config: @ionic/angular (angular) +0ms
ionic:lib:project Project details: { configPath: 'E:\\temp\\dsds\\jio\\ionic.config.json', errors: [], context: 'app', type: 'angular' } +1ms
ionic Context: { binPath: 'C:\\Users\\marck\\AppData\\Roaming\\nvm\\v10.13.0\\node_modules\\ionic\\bin\\ionic', libPath: 'C:\\Users\\marck\\AppData\\Roaming\\nvm\\v10.13.0\\node_modules\\ionic', execPath: 'E:\\temp\\dsds\\jio', version: '4.10.3' } +0ms
ionic:lib:telemetry Sending telemetry for command: 'ionic serve' [ '--verbose', '--interactive', '--color' ] +0ms
ionic:lib:hooks Looking for ionic:serve:before npm script. +0ms
ionic:utils-network checking for open port on 0.0.0.0:8
@marckassay
marckassay / Set-AssociateFileExtensions.ps1
Last active July 18, 2024 13:32
This sample provides a script for IT pro or windows customers to quickly batch associated file extensions with application on Windows by PowerShell.
<#
.SYNOPSIS
"This sample provides a script for IT pro or windows customers to quickly batch associated file extensions with application
on Windows by PowerShell."
.DESCRIPTION
"The most efficient way to change file associations is by selecting a default program. This tells Windows that you want a
certain program to be associated with all the file types it can handle. IT pro or windows customers want to have some kinds
of batch method to automatically associate a selection of file extensions. This sample script will help to quickly batch
the associated file extensions with application on Windows."
@marckassay
marckassay / symlink_resolver.cmd
Last active November 26, 2018 22:40
Batch script that resolves its symlink's value
@marckassay
marckassay / yarnissue6560.ps1
Created November 3, 2018 11:29
Demonstrates when 'yarn unlinks', symlink in user home directory still exists. See issue here: https://github.com/yarnpkg/yarn/issues/6560
$PackageName = "yarn-example-no$(Get-Random -Maximum 1000)"
New-Item -Value @"
{
"name": "$PackageName",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"private": true
}
"@ -Name package.json -Path $PackageName -Force | Out-Null
@marckassay
marckassay / Get-PublicIPv4Log.ps1
Created July 12, 2018 00:46
Calls a REST endpoint to retrieve your IPv4 address along with other information on about ISP and geo-location
<#
.SYNOPSIS
Calls a REST endpoint to retrieve your IPv4 address along with other information about ISP and geo-location
.DESCRIPTION
Long description
.PARAMETER Uri
The REST service providing the ISP information from your request. Defaults to 'http://ipinfo.io/json'
@marckassay
marckassay / Update-ModuleManifest.Tests.ps1
Created June 26, 2018 14:11
Update-ModuleManifest reverts back to previous key value after subsequent calls
Describe "Test Update-ModuleManifest" {
BeforeAll {
$ManifestContentString = @"
@{
# Script module or binary module file associated with this manifest.
RootModule = 'MockModule.psm1'
# Version number of this module.
ModuleVersion = '0.0.1'
@marckassay
marckassay / gist:45f186d0f51a1d58621a0cf4acb10457
Last active February 26, 2018 13:17
Notes on: Install Jekyll (and Ruby) on Windows for GitHub pages
1. Install Ruby that is greater or equal to 2.4.0, this will install "DevKit" that developers refer to:
	https://rubyinstaller.org/downloads/

	*** If you come across any issues and search online, be mindful that when recommended to '$ ruby dk.rb init' they are referring to an older version of Ruby than 2.4.0 ***

2. As of this writing there is bug in ridk ( https://github.com/oneclick/rubyinstaller2/issues/101 ).  So after Ruby install, restart CLI and execute:
	$ ridk exec pacman -Syu --needed --noconfirm --ask 20
	$ ridk install 2 3

3. Unable to run Jekyll following GitHub instructions ( bundle exec jekyll _3.3.0_ new NEW-JEKYLL-SITE-REPOSITORY-NAME ), so use the following instead:
@marckassay
marckassay / Get-ParentItem.ps1
Last active January 24, 2018 15:16
Similarly to Get-ChildItem, this function can recurse the -Path parameter parent or parents for a file or folder
<#
.SYNOPSIS
Similarly to Get-ChildItem, this function can recurse the -Path parameter parent or parents
for a file or folder
.DESCRIPTION
Long description
.PARAMETER Path
The path to start
@marckassay
marckassay / Get-MergedPath.ps1
Last active January 24, 2018 14:28
Returns a valid path from a parent of one of its childs which overlaps that parent.
<#
.SYNOPSIS
Returns a valid path from a parent of one of its children which overlaps that parent's path.
.DESCRIPTION
In set-theory this will be considered a relative complement. That is the directories
in ChildPath that are not in Path.
A diagram to illustrate what is mentioned above:
A = C:\Windows\diagnostics\system
@marckassay
marckassay / Get-Bytes.ps1
Last active January 21, 2018 23:20
A PowerShell function to output a file's bytes in decimal and/or binary notation
<#
.SYNOPSIS
Outputs a file's bytes in decimal and/or binary notation
.DESCRIPTION
Initially created to compare files prior to UTF encoding.
.PARAMETER Path
Path to file.