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
# Juniper SRX cheatsheet | |
#Help | |
help | |
<command> ? | |
#Show | |
show configuration |
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 | |
########################################################## | |
### INTRODUCTION | |
########################################################## | |
: ' | |
Install and configure R (Redis) + ELK server from scratch on CentOS 6.5. | |
* Logstash version 1.4.2 | |
* Elasticsearch version 1.3.2 |
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
#!/usr/bin/env python | |
import requests | |
import datetime | |
import json | |
import os | |
""" | |
Check_mk plugin to check for last log from Elasticsearch compared to current time | |
""" |
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
# | |
# Daemon for consul | |
# | |
# chkconfig: 345 98 20 | |
# description: Daemon for consul | |
# processname: consul | |
### BEGIN INIT INFO | |
# Provides: consul | |
# Required-Start: $network |
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
# | |
# Daemon for vault | |
# | |
# chkconfig: 345 99 20 | |
# description: Daemon for vault | |
# processname: vault | |
### BEGIN INIT INFO | |
# Provides: vault | |
# Required-Start: $network |
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 | |
# Generate hosts-file with private IP's in AWS ec2 | |
# Vars | |
hosts_file="/etc/hosts" | |
region="eu-west-1" | |
# AWS call | |
described_instances=`aws ec2 describe-instances --region ${region}` |
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
#!/usr/bin/env python | |
""" | |
FileCli | |
""" | |
import sys, os | |
class FileOperation(): |
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
class apache { | |
notify {'Apache2': | |
before => Service['apache2'] | |
} | |
exec {'apt-get update': | |
command => '/usr/bin/apt-get update' | |
} |
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
#!/usr/bin/env bash | |
# vars # | |
disk="/dev/disk0s2" # disk to monitor | |
current_usage=$(df -h | grep ${disk} | awk {'print $5'}) # get disk usage from monitored disk | |
max_usage="20%" # max 90% disk usage | |
mail="aarvik92@gmail.com" # mail to sent alert to | |
# functions # | |
function max_exceeded() { |
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 | |
/* | |
* | |
* Get your Facebook-statuses and Twitter-tweets on your website with ease. | |
* Go to http://feedburner.com and burn your feed. | |
* Use your feedburner-url with this class to set feed. | |
* | |
* Author: Anders Aarvik | |
* | |
*/ |
NewerOlder