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 | |
# Considerando que os diretórios estão organizados da seguinte forma: | |
# 2013010100/001/*.[ctl,idx,grb] | |
# 2013010100/002/*.[ctl,idx,grb] | |
# ... | |
# 2013010100/040/*.[ctl,idx,grb] | |
# ... | |
# 2013011000/001/*.[ctl,idx,grb] | |
# ... |
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 | |
# Considerando que os diretórios estão organizados da seguinte forma: | |
# Albedo | |
# AlbedoClima | |
# Chopping | |
# etc | |
# | |
# Linguagem: Bash | |
# @cfbastarz |
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 | |
# Considerando que os diretórios estão organizados da seguinte forma: | |
# 2020010100 | |
# 2020010200 | |
# 2020010300 | |
# etc | |
# | |
# Linguagem: Bash | |
# @cfbastarz |
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
# To be used in a Jupyter notebook | |
import panel as pn | |
pn.extension() | |
variable_list = ['var1', 'var2', 'var3'] | |
def get_val(variable): | |
return variable |
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 | |
# Script bash para calcular a diferença entre duas datas no formato YYYYMMDDHH | |
# Uso: ./date_diff.sh YYYYiMMiDDiHHi YYYYfMMfDDfHHf | |
# Exemplo: | |
# ./date_diff.sh 2013010100 2013011600 | |
# 15 dia(s) e 0 hora(s) ou 360 hora(s) | |
# @cfbastarz | |
data_anl=${1} |
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
#!/usr/bin/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
# In Catalina, do as follows: | |
# Plug the external display | |
# sudo mkdir -p /Library/Displays/Contents/Resources/Overrides | |
# cd /Library/Displays/Contents/Resources/Overrides | |
# sudo curl -O this_script.rb | |
# sudo ./this_script.rb |
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 | |
inctime=/home/carlos.bastarz/bin/inctime | |
res=TQ0299L064 | |
pfx=CPT | |
bpath=/mnt/beegfs/carlos.bastarz/SMNA-Oper/SMG/datainout/bam/pos/dataout | |
datai=2019111512 |
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
# Chop the figures (in my case, figures were in landscape mode) | |
for i in $(ls *.png); do j=$(echo $i | sed "s,.png,-chop.png,g"); convert $i -gravity South -chop 0x10 -gravity North -chop 0x50 -gravity East -chop 296x0 -gravity West -chop 296x0 $j; done | |
# Rotate the figures 90 degrees (clockwise) | |
for i in $(ls *-chop.png); do j=$(echo $i | sed "s,-chop.png,-chop-rot90.png,g"); convert $i -rotate 90 $j; done | |
# Convert all figures to PDF | |
for i in $(ls *-chop-rot90.png); do j=$(echo $i | sed "s,-chop-rot90.png,.pdf,g"); convert $i $j; done | |
# Unite all PDF (21) files into one |
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
ffmpeg -i "2023-10-02 13-42-57.mkv" -vn -c:a libmp3lame -y "2023-10-02 13-42-57.mp3" |
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
akonadi stop | |
sudo apt-get install akonadi-server akonadi-backend-postgresql | |
cd $HOME/.config/akonadi/ | |
cp akonadiserverrc akonadiserverrc.bak | |
cat << EOF > $HOME/.config/akonadi/akonadiserverrc | |
[Debug] | |
Tracer=null | |
[%General] | |
Driver=QPSQL |
OlderNewer