Skip to content

Instantly share code, notes, and snippets.

View kaellego's full-sized avatar

Wellington Moraes kaellego

View GitHub Profile
@kaellego
kaellego / cloudSettings
Last active August 12, 2020 03:56
Untitled
{"lastUpload":"2020-08-12T03:56:30.010Z","extensionVersion":"v3.4.3"}
@kaellego
kaellego / dabblet.css
Created May 15, 2016 18:44
Global Reset
/* Global Reset */
body {
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
body, p, h1, h2, h3, h4, h5, h6, img, table, td, #emailBody {
margin-top: 0;
margin-left: 0;
margin-right: 0;
<?php
function featureShell($cmd, $cwd) {
$stdout = array();
if (preg_match("/^\s*cd\s*$/", $cmd)) {
// pass
} elseif (preg_match("/^\s*cd\s+(.+)\s*(2>&1)?$/", $cmd)) {
chdir($cwd);
preg_match("/^\s*cd\s+([^\s]+)\s*(2>&1)?$/", $cmd, $match);
async function enviarScript(scriptText){
const lines = scriptText.split(/[\n\t]+/).map(line => line.trim()).filter(line => line);
main = document.querySelector("#main"),
textarea = main.querySelector(`div[contenteditable="true"]`)
if(!textarea) throw new Error("Não há uma conversa aberta")
for(const line of lines){
console.log(line)
async function enviarScript(scriptText){
const lines = scriptText.split(/[\n\t]+/).map(line => line.trim()).filter(line => line);
main = document.querySelector("#main"),
textarea = main.querySelector(`div[contenteditable="true"]`)
if(!textarea) throw new Error("Não há uma conversa aberta")
for(const line of lines){
console.log(line)
async function enviarScript(scriptText){
const lines = scriptText.split(/[\n\t]+/).map(line => line.trim()).filter(line => line);
main = document.querySelector("#main"),
textarea = main.querySelector(`div[contenteditable="true"]`)
if(!textarea) throw new Error("Não há uma conversa aberta")
for(const line of lines){
console.log(line)
@kaellego
kaellego / beeMovieSendScript.js
Created June 4, 2023 14:59
roteiro beeMovie
async function enviarScript(scriptText){
const lines = scriptText.split(/[\n\t]+/).map(line => line.trim()).filter(line => line);
main = document.querySelector("#main"),
textarea = main.querySelector(`div[contenteditable="true"]`)
if(!textarea) throw new Error("Não há uma conversa aberta")
for(const line of lines){
console.log(line)
@kaellego
kaellego / vbscript_ksc_parse.vbs
Created December 24, 2023 02:08
output file vbscript ksc parse.vbs
' Definição das variáveis
Dim strSeverity, strComputer, strDomain, strEvent, strDescr, strRiseTime
Dim strKLCSAKEventTaskDisplayName, strKLProduct, strKLVersion, strHostIP, strHostConnIP
Dim strMessage, strTelegramBotToken, strTelegramChatID, objShell, strURL, strJSONMessage, strJSONMessage1
Dim fso, logFile, strLogFile
' Recebendo os valores das variáveis de ambiente
strSeverity = WScript.Arguments(0)
strComputer = WScript.Arguments(1)
strDomain = WScript.Arguments(2)
@kaellego
kaellego / vbscript_ksc_parse_telegram.vbs
Created December 24, 2023 02:10
vbscript ksc parse telegram send
' Definição das variáveis
Dim strSeverity, strComputer, strDomain, strEvent, strDescr, strRiseTime
Dim strKLCSAKEventTaskDisplayName, strKLProduct, strKLVersion, strHostIP, strHostConnIP
Dim strMessage, strTelegramBotToken, strTelegramChatID, objShell, strURL, strJSONMessage, strJSONMessage1
Dim fso, logFile, strLogFile
Class JSONStringEncoder
Private m_RegExp
@kaellego
kaellego / monitoring.sh
Last active January 2, 2024 18:02
monitoring alexanderzobnin zabbix app memory consume */5 * * * * root /root/monitoring.sh > /dev/null 2>/dev/null
#!/bin/bash
#service monitoring
# Verifica o serviço HTTPs
/bin/netstat -tulpn | awk '{print $4}' | awk -F: '{print $2}' | grep ^443$ > /dev/null 2>/dev/null
a=$(echo $?)
if test $a -ne 0
then
echo "http service down" | mail -s "HTTP Service DOWN and restarted now" root@localhost
/etc/init.d/grafana-server start > /dev/null 2>/dev/null