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 / 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
@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 / 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 / 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 / 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 / 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 / tcl.yml
Created January 20, 2020 19:14
TCL TV - android adb command - Home Assistant
entity_id: media_player.tcl_tv
command: "am start -n com.tcl.tv/.TVActivity"
@det-peralta
det-peralta / install.sh
Last active November 25, 2020 21:55
Install NodeJS + GatsbyJS on Windows Subsystem
#NodeJS
sudo apt-get update
sudo apt-get -f install
sudo apt-get install curl
sudo apt-get install build-essential
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
nvm install --lts
nvm use --lts
echo "nvm use --lts" >> .bash_profile
@det-peralta
det-peralta / install_gatsby.sh
Last active February 18, 2020 16:41
Install Gatsby Ubuntu
#!/usr/bin/env bash
sudo apt update &&
sudo apt -y upgrade &&
#Install curl
sudo apt install curl &&
#Install git
sudo apt install git &&
@det-peralta
det-peralta / install_vscode.sh
Last active February 18, 2020 16:46
Instal Visual Studio Code on Ubuntu
#!/usr/bin/env bash
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -o root -g root -m 644 packages.microsoft.gpg /usr/share/keyrings/
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install code # or code-insiders