docker container rm $(docker container ps -qa --filter "name=example1" --filter "name=example2")
docker image rm $(docker images -q --filter "dangling=true" --filter "before=ImageID")
# list stash content without applying | |
git stash show -p stash@{1} | |
git stash show -p stash@{0} --name-only | |
# apply specific file | |
git checkout stash@{2} -- FILE_PATH/FILE_NAME |
# create a new image | |
$ convert -size 10x10 xc:red sample.jpg | |
# convert to a base64 string | |
$ base64 sample.jpg | |
# output to a file: | |
$ convert 'inline:data:image/jpeg;base64,[BASE64-DATA]' output.jpg | |
# or, output to a base64 string: |
AFAIK =» As Far As I Know | |
AFK =» Away From Keyboard | |
ASAP =» As Soon As Possible | |
BAS =» Big A$$ Smile | |
BBL =» Be Back Later |
ag -l "TEXT_TO_FIND" . | xargs sed -i.bak 's/TEXT_TO_FIND/NEW_TEXT_TO_REPLACE/g' |
# Assembles the old and new names, in the following example the name has 3 parts | |
# The NR adds a linenumber to the new name. | |
s ls pattern_file_name* | awk '{print "mv " $1"\\ "$2"\\ "$3" " $1 NR $3 }' | bash $1 |
## this | |
netstat -vanp tcp|grep PORT | |
## or this, if -p is not supported | |
lsof -i tcp:PORT |
diff -r ~/projects/sim-api/ ~/projects/onboarding/sim-api/ | grep ~/projects/sim-api/ | awk '{print $4}' > difference.txt |
////// was8 file on /etc/init.d | |
#!/bin/sh | |
# | |
### BEGIN INIT INFO | |
# Provides: was8 | |
# Required-Start: | |
# Should-Start: $ALL | |
# Required-Stop: | |
# Should-Stop: |
-- Todos os objetos do schema | |
select | |
owner, | |
sum(bytes)/1024/1024/1024 schema_size_gig | |
from | |
dba_segments | |
group by | |
owner; | |
-- Tamanho por tipo de objeto |