Skip to content

Instantly share code, notes, and snippets.

View senderic's full-sized avatar

Eric K. Sender senderic

  • San Diego, CA, USA
View GitHub Profile
@senderic
senderic / mac_lerning_config.xml
Created October 26, 2021 01:39
Example XML for CORE mac learning issue
<?xml version='1.0' encoding='UTF-8'?>
<scenario name="/tmp/tmprh7nfpq6">
<networks>
<network id="1" name="s-n1" icon="" canvas="0" type="SWITCH">
<position x="391.0" y="102.0" lat="47.578239258859554" lon="-122.12705559960862" alt="2.0"/>
</network>
<network id="2" name="h-n2" icon="" canvas="0" type="HUB">
<position x="202.0" y="102.0" lat="47.578239258859554" lon="-122.12960232343909" alt="2.0"/>
</network>
</networks>
@senderic
senderic / IdentityLinkedHashMap.java
Created September 27, 2021 16:55
Implementation of IdentityLinkedHashMap
package com.ericsender;
import com.google.common.base.Equivalence;
import com.google.common.collect.Iterators;
import java.util.*;
/**
* Combined LinkedHashMap with IdentityHashMap.
* Uses the Google common's Equivalence method of implementing IdentityHashMaps.
@senderic
senderic / web-servers.md
Created May 3, 2021 22:50 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@senderic
senderic / docker-cleanup-resources.md
Created September 24, 2019 23:51 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

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

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

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