Skip to content

Instantly share code, notes, and snippets.

View dapize's full-sized avatar
🏠
Working from home

Daniel P Z dapize

🏠
Working from home
View GitHub Profile
@dapize
dapize / install_tableplus_glibc.sh
Created February 27, 2025 20:11
Para que tableplus funcione correctamente en Debian 12
#!/bin/bash
set -e # Detener el script si hay errores
GLIBC_VERSION="2.38"
INSTALL_DIR="/opt/glibc-$GLIBC_VERSION"
TABLEPLUS_BIN="/usr/local/bin/tableplus"
TABLEPLUS_DESKTOP_SYSTEM="/usr/share/applications/tableplus.desktop"
TABLEPLUS_DESKTOP_USER="$HOME/.local/share/applications/tableplus.desktop"
TABLEPLUS_DESKTOP_OPT="/opt/tableplus/tableplus.desktop"
@dapize
dapize / install_docker.sh
Last active February 26, 2025 09:17
install docker in Linux Mint 22
#!/bin/bash
set -e # Detener el script si hay un error
echo "🔹 Eliminando claves GPG y archivos de repositorio antiguos..."
sudo rm -f /etc/apt/keyrings/docker.gpg
sudo rm -f /etc/apt/sources.list.d/docker.list
echo "🔹 Creando directorio de claves si no existe..."
sudo mkdir -p /etc/apt/keyrings
export interface IMimeTypes {
[ propName: string ]: string;
}
export const mimeTypesImgs:IMimeTypes = {
gif: 'image/gif',
jpg: 'image/jpg',
jpeg: 'image/jpeg',
png: 'image/png',
bmp: 'image/bmp',
@dapize
dapize / gist:9a028f7ae534ec66177e37ae7734831a
Created October 10, 2023 19:09
Arrow keys don't work in Git-Bash
# 1.- Open the file located here: ~/.bash_profile (in windows is: /c/Users/YourUserName/.bash_profile)
# 2.- add the next line:
export MSYS=enable_pcon
# 3.- close all the gitbash instances opened or reset Windows, open again and tha's it!
@dapize
dapize / singleton-patterm-ts
Last active August 24, 2023 16:48
Singleton Pattern in Typescript
class Office {
name: string;
employees: number;
private static instance: Office;
constructor(name: string, employees: number) {
this.name = name;
this.employees = employees;
if (typeof Office.instance === "object") {
@dapize
dapize / ffmpeg-linux-mint-installer.sh
Created February 11, 2023 02:28
Installation of FFMPEG in Linux mint
#!/bin/bash
sudo apt update -y && sudo apt upgrade -y
sudo apt install -y dirmngr ca-certificates software-properties-common gnupg gnupg2 apt-transport-https
sudo gpg --no-default-keyring --keyring /usr/share/keyrings/rob-savoury.gpg --keyserver keyserver.ubuntu.com --recv-keys E996735927E427A733BB653E374C7797FB006459
sudo gpg --list-keys
sudo gpg --no-default-keyring --keyring /usr/share/keyrings/rob-savoury.gpg --keyserver keyserver.ubuntu.com --recv-keys E996735927E427A733BB653E374C7797FB006459
echo 'deb [signed-by=/usr/share/keyrings/rob-savoury.gpg] https://ppa.launchpadcontent.net/savoury1/ffmpeg4/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list.d/ffmpeg-4-rob-savoury.list
echo 'deb [signed-by=/usr/share/keyrings/rob-savoury.gpg] https://ppa.launchpadcontent.net/savoury1/ffmpeg5/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list.d/ffmpeg-5-rob-savoury.list
sudo apt update -y && sudo apt upgrade -y
sudo apt install -y ffmpeg
@dapize
dapize / glances-installer.sh
Created February 7, 2023 00:16
Glances installer
#!/bin/bash
sudo apt update && sudo apt upgrade
sudo apt install python3 python3-dev python3-jinja2 python3-psutil python3-setuptools psensor psensor-server python3-pip lm-sensors -y
sudo pip3 install glances
glances --version
echo "DONE!!!!"
@dapize
dapize / TP-Link-AC1300-driver-installer-Linux-Debian.sh
Last active March 2, 2025 12:11
TP-Link AC1300 driver installer Linux Debian
@dapize
dapize / xstartup
Created January 7, 2023 19:15
Content of the Xstartup file for VNCServer with XFCE Desktop
# content of the file ~/.vnc/xstartup for a VNCServer with XFCE Desktop
#!/bin/sh
# Start up the standard system desktop
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
/usr/bin/startxfce4
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
x-window-manager &
@dapize
dapize / gist:49b400d5dd281459d55f248be18a8fb9
Last active January 7, 2023 18:49
Create a service for a node express app
# first we have to create a file in this target:
sudo nano /etc/systemd/system/hereTheNameOfTheService.service
# inside that file we have to paste this:
[Unit]
Description=A Description of my service
After=network.target
[Service]