Skip to content

Instantly share code, notes, and snippets.

View pulketo's full-sized avatar

Pulketo pulketo

View GitHub Profile
@pulketo
pulketo / gist:41010e6ec1b574bebd1b442fa31717c8
Created November 5, 2019 02:52
mpsyt http not supported
mkdir -p ~/src/pafy
git clone [email protected]:mps-youtube/pafy.git ~/src/pafy
cd ~/src/pafy
MPSYT=`which mpsyt`
MPSYT_PYTHON=`head -1 $MPSYT | cut -d'!' -f 2`
$MPSYT_PYTHON -m pip install .
#source https://github.com/mps-youtube/mps-youtube/issues/986
@pulketo
pulketo / mailx-sendmail-wrapper.php
Created November 6, 2019 06:51
sendmail wrapper for mailx
<?php
$fechora = date("YmdHis");$o="";
$stdin = "";
while (false !== ($line = fgets(STDIN))) {
$stdin.=$line;
}
list($H, $B) = explode(PHP_EOL.PHP_EOL, $stdin);
$header = explode(PHP_EOL, $H);
$body = explode(PHP_EOL, $B);
foreach($header as $eachHeader){
@pulketo
pulketo / gist:a28adda8f6c169fbe39b5fe280fcbd98
Created November 28, 2019 04:55
debian 10 change timezone command-line
rm -f /etc/localtime
ln -sf /usr/share/zoneinfo/America/Mexico_City /etc/localtime
@pulketo
pulketo / gist:14695fb8dd8d21e535edbc3ecc37b9a4
Created November 28, 2019 22:52
Obtener info del hardware del sistema - ubuntu
inxi -Fxzn
lxappearance
change icon set
@pulketo
pulketo / gist:c19585a5f23d504d744f03dcb7962515
Created December 5, 2019 14:24
javascript on paste event
var myElement = document.getElementById('pasteElement');
myElement.onpaste = function(e) {
var pastedText = undefined;
if (window.clipboardData && window.clipboardData.getData) { // IE
pastedText = window.clipboardData.getData('Text');
} else if (e.clipboardData && e.clipboardData.getData) {
pastedText = e.clipboardData.getData('text/plain');
}
alert(pastedText); // Process and handle text...
return false; // Prevent the default handler from running.
@pulketo
pulketo / oracleha.txt
Last active December 28, 2019 01:00
Oracle HA Acordeón
Hints:
- El profesor indica que es mejor no tener swap
- Al instalar oracle en el apartado de Servers -> System Administration Tools, por default no viene ninguno seleccionado, por lo que hay que manualmente agregar: oracle-rdbms-server-12cR1
Profesor: Conde
https://loquecallamoslosdba.wordpress.com/
RTO Recovery Time Objective: tiempo en el cual yo espero recuperarme
RPO Recovery Point Objective: tiempo que transcurre entre el momento del desastre y el último punto de restauración.
Banco RPO ~= 0
que tanto puedo perder
@pulketo
pulketo / gist:0784a1265b0564d55ca77e12babdc012
Created December 10, 2019 21:01
wp-cli comandos más utilizados
wp post-type list : Muestra los diferente tipos de posts
wp cap list bookmify-employee --show-grant : Muestra las capaidades de los usuarios que cada plugin les asigna
wp user list
wp post list
wp db cli
wp plugin list
wp plugin install --activate xxxx
wp plugin uninstall --deactivate xxxx
@pulketo
pulketo / seguridad-linux-hardening
Last active January 11, 2020 19:47
seguridad-linux-hardening
Seguridad
Daniel Guerrero
Hardening Servidores
Exámen, Practicas, Proyecto y Tareas: %25
Mejores prácticas
SSH
Contraseñas
HA
@pulketo
pulketo / config
Created January 15, 2020 00:21
config i3
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!