This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
########################################################################## | |
# Zabbix-Telegram envio de alerta por Telegram com graficos dos eventos | |
# Filename: zabbix-telegram.sh | |
# Revision: 2.2 | |
# Date: 07/02/2017 | |
# Author: Diego Maia - [email protected] Telegram - @diegosmaia | |
# Aproveitei algumas coisas: | |
# Script getItemGraph.sh Author: Qicheng |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
router.post('/zabbix_logic', async (req, res, next) => { | |
let alarm = { hostname: 'arch', group: 'servers', item: 'cpu', trigger: 'high', client: '5bbcab43c4ba0b3f9ba4eca6', type: 'zabbix' } | |
let current_time = moment().format('HH:mm:ss') | |
let rule = await model.Rules.findOne({ | |
include: [{ as: 'acls', model: model.Acls }], | |
attributes: ['uuid', 'status'], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const Connection = require('simple-ssh') | |
const crypto = require('../services/crypto') | |
exports.command = async (customer) => { | |
const ssh = new Connection({ | |
host: customer.ip, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const Connection = require('simple-ssh') | |
exports.reboot_bots = async (req, res, next) => { | |
const ssh = new Connection({ | |
host: '', | |
port: 8110, | |
user: '', | |
pass: '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@arch-docker ~]# ifconfig eth0 | |
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 | |
inet 192.168.253.51 netmask 255.255.255.0 broadcast 192.168.253.255 | |
inet6 fe80::20c:29ff:fe9d:efba prefixlen 64 scopeid 0x20<link> | |
ether 00:0c:29:9d:ef:ba txqueuelen 1000 (Ethernet) | |
RX packets 6936 bytes 610237 (595.9 KiB) | |
RX errors 0 dropped 0 overruns 0 frame 0 | |
TX packets 3872 bytes 483731 (472.3 KiB) | |
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const app = require('express')() | |
const server = require('http').Server(app) | |
const io = require('socket.io')(server) | |
const redis = require('redis') | |
server.listen(8890) | |
io.on('connection', function (socket) { | |
const connection = redis.createClient(6379, '192.168.0.100') | |
connection.subscribe('logs') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FORM | |
<form class="ui form" [formGroup]="login" (ngSubmit)="onSubmit(login.value)" novalidate> | |
<div class="field"> | |
<label>E-mail</label> | |
<input type="text" placeholder="Seu e-mail ou usuário" name="email" formControlName="email" required> | |
</div> | |
<div class="field"> | |
<label>Senha</label> | |
<input type="password" placeholder="Informe sua senha" name="password" formControlName="password" required> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
worker_processes 2; | |
error_log logs/error.log; | |
error_log logs/error.log notice; | |
error_log logs/error.log info; | |
pid logs/nginx.pid; | |
worker_rlimit_nofile 8192; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lsblk | |
# fdisk /dev/sda | |
o | |
n | |
p | |
(enter) = First | |
(enter) = Last | |
w |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
declare const gapi: any; | |
@Injectable() | |
export class GoogleService { | |
constructor() { } | |
authenticateUser(callback) { |