Skip to content

Instantly share code, notes, and snippets.

View det-peralta's full-sized avatar
💭
I may be slow to respond.

sirdetperalta det-peralta

💭
I may be slow to respond.
  • Portugal
View GitHub Profile
@det-peralta
det-peralta / zsh.sh
Last active January 3, 2020 17:26
Install and run ZSH Terminal
sudo apt-get install zsh
chsh -s $(which zsh)
apt install wget git
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
source ~/.zshrc
cd ~/.oh-my-zsh/themes/
ls -a
nano ~/.zshrc
ZSH_THEME='agnoster'
@det-peralta
det-peralta / script.bat
Created December 9, 2019 13:40
Generate ssh keys
//Windows
cd %userprofile%/.ssh
ssh-keygen -t rsa -C "[email protected]"
clip < <key-name>.pub
@det-peralta
det-peralta / restore-git-submodules.sh
Created November 25, 2019 16:18 — forked from aroemen/restore-git-submodules.sh
Restore git submodules from .gitmodules. Since git submodule init only considers submodules that already are in the index (i.e. "staged") for initialization this short script parses .gitmodules, and each url and path pair.
#!/bin/sh
set -e
git config -f .gitmodules --get-regexp '^submodule\..*\.path$' |
while read path_key path
do
url_key=$(echo $path_key | sed 's/\.path/.url/')
url=$(git config -f .gitmodules --get "$url_key")
git submodule add $url $path
@det-peralta
det-peralta / image_to_video.bat
Created October 22, 2019 14:16
Adding image to a video file using ffmpeg
for /r %%i in (*.png) do (
ffmpeg.exe -loop 1 -t 3 -i %%i -c:v libx264 -pix_fmt yuv420p %%i_1.mp4
)
del list.txt
pause
@det-peralta
det-peralta / elasticdump_export.sh
Last active October 18, 2019 14:22
Use elasticdump to export/import data from elasticsearch
#https://github.com/taskrabbit/elasticsearch-dump
#!/bin/sh
yum install -y gcc-c++ make
curl -sL https://rpm.nodesource.com/setup_12.x | bash -
yum install -y nodejs
npm install elasticdump -g --no-bin-link
export NODE_TLS_REJECT_UNAUTHORIZED=0
echo "localhost:9200/index mapping|data"
@det-peralta
det-peralta / docker-compose.jellyfin.yml
Created October 6, 2019 21:08
Docker Compose file for run Jellyfin
version: "3"
services:
jellyfin:
image: jellyfin/jellyfin:nightly
network_mode: "host"
volumes:
- /volume1/nasbox/Docker/jellyfin/config:/config
- /volume1/nasbox/Docker/jellyfin/cache:/cache
- /volume1/nasbox/Docker/jellyfin/media:/media
for /r %%i in (*.MP4) do echo file '%%i'>> list.txt
ffmpeg.exe -f concat -safe 0 -i list.txt -c copy -an output.mp4
del list.txt
pause
@det-peralta
det-peralta / concat_mp4.sh
Last active September 5, 2019 10:22 — forked from josby/concat_mp4.sh
Concat GoPro Videos with ffmpeg
ffmpeg -f concat -safe 0 -i <(for f in ./*.MP4; do echo "file '$PWD/$f'"; done) -c copy output.MP4
ffmpeg -f concat -safe 0 -i <(for f in ./*.mp4; do echo "file '$PWD/$f'"; done) -c:v libx264 -an output.mp4
@det-peralta
det-peralta / hassio_jetson_nano.sh
Created May 6, 2019 14:22
Install Hassio on Nvidia Jetson Nano
sudo -i
apt-get install software-properties-common
add-apt-repository universe
apt-get update
apt-get install -y apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq network-manager socat
#The jetson already has docker installed
#curl -fsSL get.docker.com | sh
curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh" | bash -s -- -m qemuarm-64
@det-peralta
det-peralta / readme.md
Created April 12, 2019 13:49
Docker Cups Server