This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo zypper install libvirt qemu virt-manager libvirt-daemon-driver-qemu qemu-kvm | |
sudo systemctl enable libvirtd | |
sudo systemctl start libvirtd | |
ERROR: "network 'default' is not active" | |
Solution 1: | |
sudo virsh net-list --all | |
sudo virsh net-start default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[copy/paste] | |
https://www.tomica.net/blog/2019/01/fixing-urxvt-copy-paste/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET /test2/_count | |
delete test2 | |
put test2 | |
#delete pipeline | |
DELETE _ingest/pipeline/id-hasher |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.5' | |
services: | |
es01: | |
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.6 | |
container_name: es01 | |
environment: | |
- node.name=es01 | |
- cluster.name=docker-cluster | |
- bootstrap.memory_lock=true | |
- discovery.seed_hosts=es01,es02 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.5' | |
services: | |
es01: | |
image: docker.elastic.co/elasticsearch/elasticsearch:7.12.0 | |
container_name: elasticsearch | |
environment: | |
- node.name=es01 | |
- cluster.name=docker-cluster | |
- bootstrap.memory_lock=true | |
- discovery.seed_hosts=es02,es03 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Backup | |
rpm -qa --qf "%{NAME}\n" | sort > /backup/packages-installed.log | |
#restore | |
LIST=$(cat /backup/packages-installed.log) | |
for s in $LIST; do yum -y install $s; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Count word occurrences in file | |
grep -wo '[[:alnum:]]\+' filename | sort | uniq -cd | |
# Iter over sum of a word occurence, get first column (awk print$1) and store sum in variable $sum | |
for i in $(grep -wo '[[:alnum:]]\+' alunos_atualizaram.txt | sort | uniq -cd| awk '{print $1}'); do sim=`expr $sum + $i`; done | |
echo $sum |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bind '"' split-window -c "#{pane_current_path}" | |
bind % split-window -h -c "#{pane_current_path}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################################################################ | |
# Install a printer on Arch Linux with cups using command line # | |
# Used for a HP PSC 1510 with default driver # | |
################################################################ | |
sudo pacman -S cups | |
sudo systemctl start org.cups.cupsd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%s/^\(.*\)$/"\1"/ | |
s/regex/replace/ is vim command for search n replace. | |
% makes it apply throughout the file | |
^ and $ denotes start and end of the line respectively. | |
(.*) captures everything in between. ( and ) needs to be escaped in vim regexes. | |
\1 puts the captured content between two quotes. | |
NewerOlder