Skip to content

Instantly share code, notes, and snippets.

@jlsalmon
jlsalmon / Find-OrphanDockerLayers.ps1
Created July 1, 2022 03:06 — forked from olljanat/Find-OrphanDockerLayers.ps1
Find Windows containers orphan layers
param (
[switch]$RenameOrphanLayers
)
If ($RenameOrphanLayers) {
Write-Warning "$($env:COMPUTERNAME) -RenameOrphanLayers option enabled, will rename all orphan layers"
}
# Get known layers on Docker images
[array]$ImageDetails += docker images -q | ForEach { docker inspect $_ | ConvertFrom-Json }
@jlsalmon
jlsalmon / cmder.md
Last active March 6, 2018 05:28 — forked from nickautomatic/cmder.md
Setting up Cmder to use bash by default

Set up cmder to use bash by default

  • Install cmder_full
  • In Cmder, open settings: Win + Alt + P
  • Under Startup > Tasks, add a task called {bash} with the following settings:
    • Task parameters (set icon):
      • /icon "%CMDER_ROOT%\cmder.exe"
    • Commands (open Git's bash shell):
      • "C:\Program Files (x86)\Git\bin\sh.exe" -l -new_console:d:%USERPROFILE%
  • Under Startup, set startup options to Specified name task --> {bash}
@jlsalmon
jlsalmon / cosmicdatajson
Last active October 2, 2015 20:41 — forked from pingud98/cosmicdatajson
Json format data generator for cosmic Pi
/*
DigitalReadSerial
Reads a digital input on pin 2, prints the result to the serial monitor
This example code is in the public domain.
*/
// digital pin 2 has a pushbutton attached to it. Give it a name:
//int pushButton = 2;
@jlsalmon
jlsalmon / CustomAutocompleteEditor.js
Created June 24, 2015 08:51
Custom object-backed editor for Handsontable autocomplete fields
var CustomAutocompleteEditor = Handsontable.editors.AutocompleteEditor.prototype.extend();
CustomAutocompleteEditor.prototype.beginEditing = function(initialValue, event) {
Handsontable.editors.BaseEditor.prototype.beginEditing.call(this, initialValue, event);
if (this.originalValue === undefined || this.originalValue[this.cellProperties.viewModel] === null) {
this.setValue('');
} else {
this.setValue(this.originalValue);
}