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 | |
# upgrade_unifi.sh | |
# Easy UniFi Controller Upgrade Script for Unix/Linux Systems | |
# by Steve Jenkins (stevejenkins.com) | |
# Version 2.0 | |
# Last Updated July 2, 2016 | |
# REQUIREMENTS | |
# 1) Assumes you already have any version of UniFi Controller installed |
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 { | |
tcp { | |
port => 19532 | |
type => journald | |
} | |
} | |
filter { | |
if [type] == "journald" { | |
multiline { |
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 | |
set -e | |
# Set default values | |
: ${GENTOO_ARCH:=amd64} | |
: ${GENTOO_PROFILE:=""} | |
: ${GENTOO_PORTAGE:=no} | |
# Check for Gentoo profile, if there if a profile, add a "-" | |
if [ "${GENTOO_PROFILE}x" != "x" ]; then |
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 ipa { | |
package { [ 'ipa-server', 'bind', 'bind-dyndb-ldap' ]: | |
ensure => 'installed', | |
} | |
augeas { 'nis domain name': | |
context => "/files/etc/sysconfig/network", | |
changes => [ | |
"set NISDOMAIN example.com", |
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 | |
# | |
# logstash Startup script for logstash | |
# chkconfig: 2345 20 80 | |
# description: Logstash is a log shipping, indexing, and collocation tool. | |
# processname: java | |
### BEGIN INIT INFO | |
# Provides: logstash | |
# Required-Start: $local_fs $remote_fs | |
# Required-Stop: $local_fs $remote_fs |
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 | |
# | |
# usage: ./generate_etcd.sh 10.240.0.14 10.240.0.12 10.240.0.13 | |
# output is in /tmp | |
for ipaddr in "$@" | |
do | |
let count+=1 | |
peerlist="${peerlist},infra${count}=http://${ipaddr}:2380" | |
done |
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 | |
# with help and inspiration from | |
# * ASN1_generate_nconf(3) (specifically the SubjectPublicKeyInfo structure) | |
# * http://www.sysmic.org/dotclear/index.php?post/2010/03/24/Convert-keys-betweens-GnuPG%2C-OpenSsh-and-OpenSSL | |
# * http://blog.oddbit.com/2011/05/converting-openssh-public-keys.html | |
import sys | |
import base64 | |
import struct |
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
#cloud-config | |
coreos: | |
units: | |
- name: etcd.service | |
command: restart | |
- name: fleet.service | |
command: restart | |
etcd: |
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
alias passthing="curl -s -L 'https://secure.pctools.com/guides/password/?length=13&phonetic=on&alpha=on&mixedcase=on&numeric=on&nosimilar=on&quantity=20&generate=true#password_generator' | grep \"<tr><td valign=top nowrap style='border: 1px solid #c5c5c7;padding-top:3px;padding-bottom:3px'><b>\" | sed -r 's/<tr><td valign=top nowrap style=.border: 1px solid #c5c5c7;padding-top:3px;padding-bottom:3px.><b>([[:alnum:]]+)<.b><.td><td valign=top style=.border: 1px solid #c5c5c7;padding-top:3px;padding-bottom:3px.><i>([-a-zA-Z \(\)]+)<.i><.td><.tr>/\1 \2/g'" |
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
[Match] | |
Name=bond0 | |
[Network] | |
Address=192.168.1.111/24 | |
Gateway=192.168.1.1 | |
DNS=8.8.8.8 |