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
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 April 23, 2024 19:35
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]
@dapize
dapize / gist:5c3bc894d3d1e0789858b94934ce265d
Created September 27, 2022 05:57
Error: You are missing the following 32-bit libraries, and Steam may not run: libGL.so.1
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt install libgl1-mesa-dri:i386 libgl1:i386
sudo apt-get upgrade steam -f
sudo apt install nvidia-driver-libs:i386
@dapize
dapize / fix-setlocate-en_us.utf-8-error-steam
Created August 11, 2022 06:30
Fix SetLocale en_US.UTF-8 Error - Steam
# first lets open the file locate.gen with nano but with root
sudo nano /etc/locale.gen
# second, lets uncomment the "en_US.UTF-8" line
# thrid save the file and set the next command:
sudo locale-gen
# and that's all.