Skip to content

Instantly share code, notes, and snippets.

View victorvs0uz4's full-sized avatar
🎯
Focusing

Victor victorvs0uz4

🎯
Focusing
View GitHub Profile
@victorvs0uz4
victorvs0uz4 / init.reg
Last active September 2, 2019 11:21
Chaves de inicialização de programas
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run --- 32 Bits
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run -- 64 Bits
@victorvs0uz4
victorvs0uz4 / uap-reboot.sh
Created May 27, 2019 11:17 — forked from sjwilliams/uap-reboot.sh
Simple shell script to remotely reboot a Ubiquiti UBNT UniFi Access Point (UAP, UAP-PRO, UAP-AC, etc.)
#!/bin/sh
# A simple script for remotely rebooting a Ubiquiti UniFi access point
# Version 1.0 (Dec 15, 2015)
# by Steve Jenkins (http://www.stevejenkins.com/)
# Requires sshpass (https://sourceforge.net/projects/sshpass/) which
# is probably available via dnf, yum, or apt on your *nix distro.
# USAGE
@victorvs0uz4
victorvs0uz4 / mikrotik.sh
Last active January 6, 2020 23:25
Comando console Mikrotik
ip hotspot host print count-only where bypassed # Quantidade de hosts no Bypass do Hotspot
ip hotspot host print count-only where bypassed to-address ~"10.97" # Apenas 10.97
ip dhcp-server lease print count-only where dynamic # Quantidade de hosts no lease do DHCP-Server
:put ([/interface pppoe-client monitor PPPoE_Redenilf once as-value]->"uptime") # Uptime PPPoE
interface pppoe-server print count-only where service=service1 # Contagem de PPPoE por servidor
@victorvs0uz4
victorvs0uz4 / ntp.md
Created November 8, 2018 18:14
Configurando NTP Windows

Configurando NTP (Windows) por registro e linha de comando.

Podemos adicionar no registro o seguinte comando:
REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\DateTime\Servers" /v 0 /t REG_SZ /d "c.ntp.br" /f
E logo após "ressincronizar:"
@echo on & @setlocal enableextensions
@echo =========================
@echo Turn off the time service
net stop w32time
@echo ======================================================================
@echo Set the SNTP (Simple Network Time Protocol) source for the time server
w32tm /config /syncfromflags:manual /manualpeerlist:"0.it.pool.ntp.org 1.it.pool.ntp.org 2.it.pool.ntp.org 3.it.pool.ntp.org"
@echo =============================================
@echo ... and then turn on the time service back on
net start w32time
@victorvs0uz4
victorvs0uz4 / mybkp.sh
Created October 31, 2018 13:05
Script backup MySQL
#! /bin/bash
TIMESTAMP=$(date +"%Y%m%d")
BACKUP_DIR="/dados/bkp_mysql/$TIMESTAMP"
MYSQL_USER="root"
LINUX_USER="root"
MYSQL=/usr/bin/mysql
MYSQL_PASSWORD="password"
MYSQLDUMP=/usr/bin/mysqldump
@victorvs0uz4
victorvs0uz4 / docker-compose.yml
Last active December 4, 2018 18:50
wordpress-traefik-proxy
version: '3.1'
networks:
web:
external: true
services:
wordpress:
image: wordpress
labels:
version: '2'
services:
wordpress:
image: wordpress:latest # https://hub.docker.com/_/wordpress/
ports:
- "80:80" # change ip if required
volumes:
- ./config/php.conf.uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
- ./wp-app:/var/www/html # Full wordpress project
#- ./plugin-name/trunk/:/var/www/html/wp-content/plugins/plugin-name # Plugin development
@victorvs0uz4
victorvs0uz4 / docker-compose.yml
Last active December 3, 2018 22:40
portainer-traefik-proxy
version: '2'
networks:
web:
external: true
services:
portainer:
image: portainer/portainer
container_name: portainer
labels:
- traefik.backend=portainer
docker run --name phpmyadmin -d --link mysql_server -p 8081:80 -e PMA_HOST=mysql_server --network wordpress_wordpress-network phpmyadmin/phpmyadmin