Skip to content

Instantly share code, notes, and snippets.

View mikemichaelis's full-sized avatar

Mike Michaelis mikemichaelis

View GitHub Profile
@matisojka
matisojka / docker-cleanup-resources-centos.md
Last active June 1, 2018 19:32 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks (CentOS version)

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ sudo docker volume rm $(sudo docker volume ls -qf dangling=true)

$ sudo docker volume ls -qf dangling=true | xargs -r sudo docker volume rm

@JPvRiel
JPvRiel / deb_apt_dpkg_locked.md
Created February 16, 2017 10:37
Troubleshoot "Could not get lock /var/lib/dpkg/lock" errors when trying to update or install debian packages

Troubleshoot "Could not get lock /var/lib/dpkg/lock" errors when trying to update or install debian packages

Error Message

E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

@JPvRiel
JPvRiel / bash_history_to_syslog.md
Last active August 29, 2023 09:11
Notes on (ab)using bash history to record commands to syslog

Logging bash history to syslog

Overview

Bash history was a convenience feature to help a user recall previous commands and not intended to meet any security requirements.

The Linux audit system (or alternate kernel level audit OS facility) is a more robust way to ensure user and process log events are recorded.

Security issues with bash history files and $BASH_COMMAND

@alexdresko
alexdresko / T4TS.tt
Last active February 25, 2017 22:56
T4 template to generate TypeScript interface definitions with BreezeJS support.
<#@ template language="C#" debug="true" hostspecific="true" #>
<#@ output extension=".d.ts" #>
<#@ assembly name="System.Core" #>
<#@ assembly name="Microsoft.VisualStudio.Shell.Interop.8.0" #>
<#@ assembly name="EnvDTE" #>
<#@ assembly name="EnvDTE80" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="EnvDTE" #>
@tony4d
tony4d / p4merge4git.md
Created August 24, 2012 19:00
Setup p4merge as a visual diff and merge tool for git