Skip to content

Instantly share code, notes, and snippets.

@renfredxh
renfredxh / clean-images.rb
Last active August 29, 2015 14:09
Clean untagged Docker images and zombie containers
#!/usr/bin/env ruby
# Description: Sometimes after building, starting and killing a number of
# docker containers over time, you end up with images that cannot be removed
# removed because zombie containers are referencing them. This removes all
# images of a given name or untagged images and the container that
# reference them.
#
# Disclaimer: This is recommended for development environments only.
# Frivolous usage may result in unintended data loss.
#
@renfredxh
renfredxh / .ctags
Last active August 7, 2020 14:16
Typescript ctags config
--langdef=typescript
--langmap=typescript:.ts.tsx
--regex-typescript=/^[ \t]*(export)?[ \t]*class[ \t]+([a-zA-Z0-9_]+)/\2/c,classes/
--regex-typescript=/^[ \t]*(declare)?[ \t]*namespace[ \t]+([a-zA-Z0-9_]+)/\2/c,modules/
--regex-typescript=/^[ \t]*(export)?[ \t]*module[ \t]+([a-zA-Z0-9_]+)/\2/n,modules/
--regex-typescript=/^[ \t]*(export)?[ \t]*function[ \t]+([a-zA-Z0-9_]+)/\2/f,functions/
--regex-typescript=/^[ \t]*export[ \t]+var[ \t]+([a-zA-Z0-9_]+)/\1/v,variables/
--regex-typescript=/^[ \t]*var[ \t]+([a-zA-Z0-9_]+)[ \t]*=[ \t]*function[ \t]*\(\)/\1/v,varlambdas/
--regex-typescript=/^[ \t]*(export)?[ \t]*(public|protected|private)[ \t]+(static)?[ \t]*([a-zA-Z0-9_]+)/\4/m,members/
--regex-typescript=/^[ \t]*(export)?[ \t]*interface[ \t]+([a-zA-Z0-9_]+)/\2/i,interfaces/