Skip to content

Instantly share code, notes, and snippets.

View Zobber's full-sized avatar
🎯
Focusing

Erick "Zobber" Zobber

🎯
Focusing
  • Universidad Nacional Abierta y a Distancia
  • Colombia
View GitHub Profile
@Zobber
Zobber / ts3_install.sh
Last active April 24, 2023 18:48
Teamspeak Script Install (Edited)
#!/bin/bash
# Name: install_ts3-server.sh
# Version: 1.3
# Created On: 3/5/2015
# Updated On: 11/17/2019
# Created By: rcguy
# Description: Automagically installs the Linux TeamSpeak 3 Server
# Tested on: Debian 10 / x64 / VPS / 2 Cores / 2GB RAM / 20 GB SSD
# ==> VARIABLES <==
@Zobber
Zobber / chr_mk.sh
Created August 15, 2022 22:01
CHR Router OS Mikrotik
wget https://download.mikrotik.com/routeros/6.36.3/chr-6.36.3.img.zip -O chr.img.zip
gunzip -c chr.img.zip > chr.img
mount -o loop,offset=33554944 chr.img /mnt
ADDRESS=`ip addr show eth0 | grep global | cut -d' ' -f 6 | head -n 1`
GATEWAY=`ip route list | grep default | cut -d' ' -f 3`
echo "/ip address add address=$ADDRESS interface=[/interface ethernet find where name=ether1]
/ip route add gateway=$GATEWAY
" > /mnt/rw/autorun.scr
umount /mnt
echo u > /proc/sysrq-trigger
@Zobber
Zobber / robocopy_espejo
Created February 27, 2022 03:49
Copy all changed or newer files using ROBOCOPY (Windows)
ROBOCOPY "path_from" "path_to" /E /XC /XN /XO
@Zobber
Zobber / gist:d49d83ee65cb364a51a7a1f79cdee8ec
Created December 3, 2021 13:41
HP PrintNightmare - Imprime caracteres extraños
https://support.hp.com/mx-es/document/c02177345
https://h30467.www3.hp.com/t5/Impresi%C3%B3n-escaneo-fax-y-copia/Impresion-caracteres-a2/td-p/749974
net stop spooler
net start spooler
@Zobber
Zobber / date.php
Created November 30, 2021 19:29
Fecha (Date) in PHP
setlocale(LC_ALL,"es_ES@euro","es_ES","esp");
$d = "nombre de l campo en la base de datos";
$fecha_base = strftime("%d de %B de %Y", strtotime($d));
echo $fecha_base;
@Zobber
Zobber / robocopy all newer and changed files
Created May 4, 2021 13:51
Copy all new archives and modified but not older files
robocopy E:\FILESERVER Z: /E /XO
tail -f /var/db/system/syslog-xxxxxxxxxx/log/messages
/var/log/samba4
######################
Source #
######################
https://www.truenas.com/community/threads/tutorial-add-full-logging-on-samba-shares-full_audit-freenas-9-3.13840/
##
Desinstalar Antivirus
##
Descargar el solucionador de problemas
https://support.microsoft.com/en-gb/help/10164/fix-windows-update-errors
##
Para los servicios
net stop wuauserv
net stop cryptSvc
<?php
$apiToken = "854842803:AAEGwx06SX7DfiPTTfzqSOOdG11VdC9IDaY";
$data = [
'chat_id' => '1001934878',
'text' => 'Nuevo registro'
];
$response = file_get_contents("https://api.telegram.org/bot$apiToken/sendMessage?" . http_build_query($data) );
// Do what you want with result
## Check information about the AD
net ads info join status workgroup gpo dns user
## Commands for to verify the conection established with AD
1) sqlite3 /data/freenas-v1.db "UPDATE directoryservice_activedirectory SET ad_enable=1"
2) service ix-hostname start
3) service ix-kerberos start