Skip to content

Instantly share code, notes, and snippets.

View willemdh's full-sized avatar
👁️
Consolidating

Willem D'Haese willemdh

👁️
Consolidating
View GitHub Profile
@dongilbert
dongilbert / wp-shell-install.sh
Created May 2, 2011 15:27
Auto Install Latest WordPress from Shell
#!/bin/bash
# Install script for Latest WordPress by Johnathan Williamson - extended by Don Gilbert
# Disclaimer: It might not bloody work
# Disclaimer 2: I'm not responsible for any screwups ... :)
# DB Variables
echo "MySQL Host:"
read mysqlhost
export mysqlhost
@cballou
cballou / linode-stackscript-centos-lemp-advanced
Created July 19, 2011 14:09
An advanced Linode StackScript for deploying a CentOs 64bit LEMP Stack with a ton of extras and configuration: MySQL, Suhosin, Memcached, Monit, Supervisord, Gearman, Beanstalk, Fail2Ban, IPTables Firewall, SSH
#!/bin/bash
#
# MYSQL CONFIG
# ============
# <UDF name="db_password" Label="Choose a MySQL Root Password" />
# <UDF name="db_name" Label="MySQL - Database Name" default="" example="Optionally create this database." />
# <UDF name="db_user" Label="MySQL - Username" default="" example="Optionally create this user." />
# <UDF name="db_user_password" Label="MySQL - Password" default="" example="The user password." />
#
# OPTIONAL LIBRARIES TO INSTALL
@jfro
jfro / update-dns.sh
Created January 11, 2012 17:31
Linode dynamic DNS updating script
#!/bin/sh
# modified by jfro from http://www.cnysupport.com/index.php/linode-dynamic-dns-ddns-update-script
# Uses curl to be compatible with machines that don't have wget by default
LINODE_API_KEY=licensekey
DOMAIN_ID=domainid
RESOURCE_ID=resourceid
WAN_IP=`curl -s http://example.com/whatsmyip.php`
if [ -f $HOME/.wan_ip.txt ]; then
@reyjrar
reyjrar / elasticsearch.yml
Last active May 12, 2023 11:58
ElasticSearch config for a write-heavy cluster
##################################################################
# /etc/elasticsearch/elasticsearch.yml
#
# Base configuration for a write heavy cluster
#
# Cluster / Node Basics
cluster.name: logng
# Node can have abritrary attributes we can use for routing
@VoodooZ
VoodooZ / logstash.conf
Last active December 14, 2015 07:19
deprecated feature warnings problem.
# input section
input {
# Handles events forwarded from Elgin's rsyslog receptor (DEV)
tcp {
port => 10514
type => "syslog"
tags => "dev"
}
@shirou
shirou / ssh_keyscan.yml
Last active March 14, 2024 12:16
run ssh-keyscan to add keys to known_hosts. This is a playbook for ansible
---
- hosts: all
gather_facts: no
sudo: no
tasks:
- name: run ssh-keyscan to add keys to known_hosts
local_action: shell ssh-keyscan {{ ansible_ssh_host }} >> ~/.ssh/known_hosts
@mdnmdn
mdnmdn / ConvertTo-JSON.ps1
Last active January 2, 2022 14:10
ConvertTo-JSON for Powershell 2.0
function Escape-JSONString($str){
if ($str -eq $null) {return ""}
$str = $str.ToString().Replace('"','\"').Replace('\','\\').Replace("`n",'\n').Replace("`r",'\r').Replace("`t",'\t')
return $str;
}
function ConvertTo-JSON($maxDepth = 4,$forceArray = $false) {
begin {
$data = @()
}
@gschueler
gschueler / policy1.yaml
Last active May 4, 2017 17:27
example restriction for group to set of jobs
description: Admin, all access.
context:
project: '.*' # all projects
for:
resource:
- allow: '*' # allow read/create all kinds
adhoc:
- allow: '*' # allow read/running/killing adhoc jobs
job:
- match:
@wmono
wmono / logstash-loglevel.rb
Last active August 29, 2015 13:55
Logstash filter to normalize log level/severity for syslog, JCL, JUL
require "logstash/filters/base"
require "logstash/namespace"
#
# Filter plugin to normalize log levels from various logging frameworks
#
# The output field (log_level by default) will contain a number between
# 100 and 999, inclusive, with higher numbers indicating higher
# importance or severity.
#
@ishara
ishara / logstash
Created March 10, 2014 12:59
logstash for tomcat
#
#
input {
file {
type => "apache"
path => ["/var/log/httpd/logstash_access_log"]
}
file {
type => "tomcat"
path => [ "/var/log/tomcat6/catalina.out" ]