This file contains 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 | |
CPU_NAME=`awk -F: '/model name/ { gsub(/^ */, "", $2); print $2 }' /proc/cpuinfo | head -1` | |
CPU_01=`sensors | grep -E "Tctl:\s+\+[0-9]+\.[0-9]+" | awk '{print $2}' | grep -oP '[0-9]+\.[0-9]+'` | |
CPU_02=`sensors | grep -E "Tccd1:\s+\+[0-9]+\.[0-9]+" | awk '{print $2}' | grep -oP '[0-9]+\.[0-9]+'` | |
GPU_NAME=`/usr/bin/nvidia-smi | grep -E 'NVIDIA\s' | awk '{print $3, $4, $5, $6}'` | |
GPU_01=`/usr/bin/nvidia-smi | grep -E '[0-9]+C' | awk '{print $3}' | grep -oP '[0-9]+'` | |
HDD01_00=`lsblk -d -o NAME,MODEL | tail -n 2 | head -n 1 | awk '{print $2,$3}'` | |
HDD01_01=`sensors | head -n 10 | tail -n 1 | grep -oP '\+[0-9]+\.[0-9]+' | head -n 1 | grep -oP '[0-9]+\.[0-9]+'` |
This file contains 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
# instalatu | |
pip3 install | |
# requirements sortu | |
pip3 freeze > requirements.txt | |
# fitxategiak mugitu | |
# zerbitzari berrian instalatu | |
pip install -r ./requirements.txt --no-index --find-links ./ |
This file contains 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
<?php | |
new ia( | |
[ | |
'extensions' => ['mp4'], | |
'suffix' => '-ia', | |
'from' => '/home/zital/Videos/to_encode/', | |
'to' => '/home/zital/Videos/encoded/', | |
'ffmpeg_bin' => '/usr/bin/ffmpeg', | |
'ffmpeg_argv' => '-b:v 4340k -an -c:v h264_nvenc -pix_fmt yuv420p', |
This file contains 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
<?php | |
// Disable WSDL caching | |
ini_set("soap.wsdl_cache_enabled", "0"); | |
$wsdl = "http://localhost:8000/service.wsdl"; | |
try | |
{ | |
$a = 4; | |
$b = 5; |
This file contains 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
LDAP_DOMAIN="zital.lan" | |
LDAP_BASEDN="dc=zital,dc=lan" | |
LDAP_GROUPS='["Group01", "Group02"]' | |
LDAP_ATTRS='["*"]' | |
LDAP_HOSTS='["ldap01.zital.lan:389","ldap02.zital.lan:389","ldap02.zital.lan:389"]' |
This file contains 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 | |
HOST="ldap.zital.eus" | |
BASEDN="dc=zital,dc=lan" | |
USER="zital@zital.eus" | |
PASSWD="12345" | |
ldapsearch -x -H ldap://${HOST} -b ${BASEDN} -D ${USER} -w ${PASSWD} "(samaccountname=${USER})" |
This file contains 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
# /etc/nginx/modules-available/rtmp.conf | |
rtmp { | |
server { | |
listen 1935; | |
chunk_size 4096; | |
allow publish 127.0.0.1; | |
deny publish all; | |
application live { |
This file contains 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
/* | |
install: | |
npm install prompt-sync --save-dev | |
npm install testcafe --save-dev | |
create: | |
env.json with github credentials: {user: user, passwd: passwd} | |
exec: | |
npx testcafe firefox:headless porru.js |
This file contains 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
# .config/fish/config.fish | |
if status is-interactive | |
# Commands to run in interactive sessions can go here | |
set -g fish_prompt_pwd_dir_length 0 | |
end |
This file contains 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 | |
# resize and crop | |
# ffmpeg: 1440x1072 -> 1452x1080 -> 1440x1080 rockchip h264_rkmpp | |
ffmpeg-rockchip -i input.mp4 -b:v 2472k -vcodec h264_rkmpp -s 1452x1080 -r 30 -g 60 -b:a 160k -ar 44100 -threads 4 tmp.mp4 | |
ffmpeg-rockchip -i tmp.mp4 -b:v 2472k -vcodec h264_rkmpp -s 1440x1080 -r 30 -g 60 -filter:v \"crop=1440:1080:6:0\" -aspect 4:3 -acodec copy -threads 4 output.mp4 |
NewerOlder