Skip to content

Instantly share code, notes, and snippets.

View Magamex's full-sized avatar
😄

Matias Magamex

😄
View GitHub Profile
@Magamex
Magamex / gist:87940e42739fc8ee8ea5807a9dbfe6f6
Created November 28, 2023 18:31
ag grip table laravel vue
<template>
<div style="height: 100%">
<div style="margin: 10px 0;">
<input type="text" id="filter-text-box" placeholder="Filter..." v-on:input="onFilterTextBoxChanged()">
<button @click="onBtnExport()">Download CSV export file</button>
</div>
<ag-grid-vue
style="width: 100%; height: 500px"
const mysql = require('mysql2');
//Generar una conexión a la base de datos
const connection = mysql.createConnection({
host: 'localhost',
user: 'root',
database: 'test',
port: 3306
});
@Magamex
Magamex / sk.sh
Created August 8, 2020 02:09
sk es un script para conectarse por ssh, enviar y recibir archivos y crear tunel
#!/bin/bash
# https://misc.flogisoft.com/bash/tip_colors_and_formatting
# https://bytefreaks.net/gnulinux/bash/cecho-a-function-to-print-using-different-colors-in-bash
negro='\E[0;47m'
rojo='\E[0;31m'
verde='\E[0;32m'
amarillo='\E[0;33m'
azul='\E[0;34m'
magenta='\E[0;35m'
#!/bin/sh
# Script that checks whether apache is still up, and if not:
# - e-mail the last bit of log files
# - restarts it
PATH=/bin:/usr/bin
THEDIR=/tmp/apache-watchdog
EMAIL=your@email.com
mkdir -p $THEDIR
@Magamex
Magamex / ARCH_INSTALL.MD
Created November 26, 2019 11:47 — forked from heppu/ARCH_INSTALL.MD
Installing Arch with GPT, dm-crypt, LUKS, LVM and systemd-boot

Create bootable USB

dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress && sync

Boot from USB and set prepare system

loadkeys <your-keymap>
@Magamex
Magamex / uefisetup.sh
Created November 7, 2019 13:20 — forked from Apsu/uefisetup.sh
Arch Linux UEFI Setup
# **************** READ THIS FIRST ******************
#
# This is not a script for you to run. I repeat, do not download and run this!
#
# This is only a guide to show the required steps for successful UEFI + GRUB2 installation
# Many of the choices are examples or assumptions; don't blindly type shit into your machine
# until/unless you at least read the comments around each command
#
# These steps assume you've booted in UEFI mode by preparing your USB stick per these instructions:
# https://wiki.archlinux.org/index.php/UEFI#Archiso
@Magamex
Magamex / tutorial_install_arch_pendrive
Last active October 1, 2019 14:09
Install Arch in Pendrive
video tutorial: https://www.youtube.com/watch?v=1nPesiEhuic
sudo pacman -S arch-install-scripts
***make sure usb is NOT mounted***
wipefs -a /dev/sdf
fdisk /dev/sdf
disable journal
@Magamex
Magamex / sp
Created November 8, 2018 13:43 — forked from streetturtle/sp
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/bin/bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#