Skip to content

Instantly share code, notes, and snippets.

@figroc
figroc / rescue-lost.sh
Created March 29, 2018 07:17
ubuntu recovery mode
mount -o rw,remount /
@figroc
figroc / filebeat-status.sh
Last active March 27, 2018 12:06
show .filebeat sync status
#!/bin/bash -e
vol="${1}"
if [[ -z "${vol}" ]]; then
echo "usage: sudo ${0} <volume_name>" 1>&2
exit 1
fi
daemon="/etc/docker/daemon.json"
if [[ -f ${daemon} ]]; then
@figroc
figroc / dump-code.sh
Last active March 27, 2018 11:28
dump only code to text file
#!/bin/bash -e
dfi="${1}"
if [[ -z "${dfi}" ]]; then
echo "${0} <dir|file> [out]" 1>&2
exit 1
fi
if [[ ! -e "${dfi}" ]]; then
echo "${dfi} not found" 1>&2
exit 1