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
#when you have no space left on your server and your link is weak you hace no choice to remove or compress files . of course you can use awk in normal way but somtimes you log or text file contain messy things and its hard to select all pattern between start of file and end | |
# i use awk flag(on and off) but in normal timestamp(clear with no messy things) you can use split option to extract log | |
#!/bin/bash | |
awk '/2017-03-01/{flag=1}flag;/2017-04-01/{flag=0}' huge.log | gzip > 2017-03 |
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
while IFS= read -r line;do | |
fields=($(printf "%s" "$line"|cut -d' ' --output-delimiter=' ' -f1-)) | |
echo "http://127.0.0.1:5000/services/rest/zzz/subscribe-withactor?mobilenum="${fields[1]}"&service_id="${fields[2]}"&shortcode="${fields[0]}"&message=&actor=MO;" | |
done < yourfile |
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
version: '2' | |
services: | |
ocserv: | |
image: tommylau/ocserv | |
ports: | |
- '443:443' | |
environment: | |
CA_CN: VPN CA | |
CA_ORG: Big Corp | |
CA_DAYS: '9999' |
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
yum-config-manager \ | |
--add-repo \ | |
https://download.docker.com/linux/centos/docker-ce.repo | |
yum install --setopt=obsoletes=0 \ | |
docker-ce-17.03.2.ce-1.el7.centos.x86_64 \ | |
docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch |
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
<?php | |
namespace Deployer; | |
require 'recipe/common.php'; | |
const PRODUCTION_ENV = 'production'; | |
const TEST_ENV = 'test'; | |
// Project name | |
set('application', 'my_project'); |
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
version: '2' | |
volumes: | |
esdata: | |
external: true | |
driver: local | |
edatanode: | |
external: true | |
driver: local | |
services: | |
elasticsearch: |
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
version: '2' | |
volumes: | |
esdata: | |
external: true | |
driver: local | |
edatanode: | |
external: true | |
driver: local | |
services: | |
elasticsearch: |
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
FROM docker.elastic.co/logstash/logstash:6.3.2 | |
RUN rm -f /usr/share/logstash/pipeline/logstash.conf | |
ADD ./pipeline/ /usr/share/logstash/pipeline/ | |
USER root | |
RUN chown logstash:root /usr/share/logstash/pipeline/logstash.conf && chmod 644 /usr/share/logstash/pipeline/logstash.conf | |
USER logstash |
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
input { | |
gelf { | |
port => 12201 | |
type => gelf | |
} | |
} | |
filter { | |
grok { | |
match => { "message" => "%{IPORHOST:remote_addr} - %{USERNAME:remote_user} \[%{HTTPDATE:time_local}\] \"%{DATA:request}\" %{INT:status} %{NUMBER:bytes_sent} \"%{DATA:http_referer}\" \"%{DATA:http_user_agent}\"" } |
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
curl -k -X PUT \ | |
-u "user-token:password" \ | |
-H 'Accept: application/json' \ | |
-H 'Content-Type: application/json' \ | |
-d "{\"containers\":[{\"allowPrivilegeEscalation\":false,\"image\":\"YourImage\",\"imagePullPolicy\":\"Always\",\"initContainer\":false,\"name\":\"bisthijdah-webserver\"}]}" \ | |
"yourbaseURL/v3/project/yourprojectid/workloads/deployment:namespace:yourappname" |
OlderNewer