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 / passthru-nvidia-to-lxc.sh
Created May 20, 2024 10:11 — forked from paul-chambers/passthru-nvidia-to-lxc.sh
nvidia GPU passthru to an LXC container (for Debian)
#!/bin/bash
# In both host and container, add the nVidia repros (see https://nvidia.github.io/nvidia-container-runtime/)
set -x
which curl > /dev/null || apt install curl
# add the repo key:
curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey | sudo apt-key add -
# add the 'nvidia container runtime' repo to apt's sources
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
@det-peralta
det-peralta / javainstall.sh
Created March 5, 2020 11:32 — forked from Sawaba/javainstall.sh
Java JDK 11 install script for Windows Subsystem for Linux (WSL)
#!/bin/bash
# This script adapted from an older post on StackOverflow by user fieldju
# https://stackoverflow.com/questions/36478741/installing-oracle-jdk-on-windows-subsystem-for-linux
# The script was for JDK 8.
# Due to major changes with JDK 11 (no JRE, no Derby, Unlimited Strength included), it was necessary to update the entire script.
set -ex
# UPDATE THESE URLs (this one updated as of 2019-03-06)
export JDK_URL=http://download.oracle.com/otn-pub/java/jdk/11.0.2+9/f51449fcd52f4d52b93a989c5c56ed3c/jdk-11.0.2_linux-x64_bin.tar.gz
@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 / 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_ubuntu_install_commands.sh
Created February 11, 2019 23:38 — forked from frenck/hassio_ubuntu_install_commands.sh
Simple install command for installing Hass.io on a Generic Ubuntu/Debian machine
sudo -i
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 software-properties-common
curl -sSL https://get.docker.com | sh
curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-build/master/install/hassio_install" | bash -s
@det-peralta
det-peralta / tensorflow_setup.sh
Last active April 1, 2019 21:38 — forked from hunterjm/tensorflow_setup.sh
TensorFlow Object Detection Setup (Linux)
# Change this path to your config directory
CONFIG_DIR="/config"
cd /tmp
# Install required software
apt-get update
apt-get upgrade
apt-get install unzip
apt-get install git
@det-peralta
det-peralta / multiple_ssh_setting.md
Last active October 27, 2018 19:36 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys

create different public key

create different ssh key, Git Bash on Windows / GNU/Linux / macOS:

$ ssh-keygen -t rsa -C "your_email@youremail.com"