curl -L | perl - --sudo App::cpanminus
#Install module with dependencies
sudo cpanm Foo::Bar
use File::Slurp;
#Reads an entire file into a string (scalar)
my $text = read_file( 'index.html' ) ;
#Writes a string (scalar) into a file
write_file( 'index_2.html', $text ) ;
View CSharp_UtilityClasses_GenericDeepCopyClass.cs
using System;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
namespace IsKernel.Pool.Vanilla.Memory
public static class GenericCopyMaker<T>
public static T GetDeepCopy(object objectToCopy)
View CSharp_GrandTrunkCurrencyConversionApi_Example.cs
using System;
using System.Collections.Generic;
using IsKernel.Api.Pool.Currency;
namespace GrandTrunkCurrenciesApiExample
class Program
public static void Main(string[] args)
View CSharp_Nunit_AlwaysObtainAFutureDate_Example.cs
//The RIGHT way
public void GetConversionRate_DateFutureParameter_ThrowsException()
//This will always return a date that will be in the future
DateTime future = DateTime.Now.AddYears(1);
Assert.Throws( typeof(CurrencyConversionException),
() => GrandTrunkCurrencyConversionService.Instance
//Equivalent of C# Environment.Newline
View Notebook_CSharp_DesignPatterns_Singleton.cs
using System;
public class Singleton
private static Singleton instance;
private Singleton() {}
public static Singleton Instance
View Notebook_PowerShell_ChangeExecutionPolicy.ps1
#Allows execution PowerShell scripts on System
Set-ExecutionPolicy Unrestricted
View Notebook_PowerShell_FixCorruptDirectory.ps1
When you attempt to open, delete or rename a file or folder using Windows NT
Explorer, File Manager or a command prompt, you may receive one of the
following error messages:
<drive>:\<folder> is not accessible
The file or directory is corrupt and non-readable.
The file or directory is corrupt and non-readable.
The file or directory \<folder> is corrupt and unreadable.
#The drive you want to check
View Html_TableSorter_HowTo.html
<!DOCTYPE html>
<table border="1" id="sortableTable">