Skip to content

Instantly share code, notes, and snippets.

View AysadKozanoglu's full-sized avatar
💭
free 4 ever

Aysad Kozanoglu AysadKozanoglu

💭
free 4 ever
View GitHub Profile
@agustik
agustik / vrrp
Last active March 12, 2018 23:22
simple keepalived status script for 2 interfaces
#!/bin/bash
configfile=/etc/keepalived/keepalived.conf
content=$(egrep '(vrrp_instance|interface|virtual_ipaddress)' -A1 $configfile | egrep -v "(\-\-|track_|virtual_)" | grep -A6 vrrp_);
#echo "$content";
instance_1=$(echo "$content" | grep "VI_1" -A4);
instance_2=$(echo "$content" | grep "VI_2" -A4);
@mutaku
mutaku / tkinter_printer_selection.py
Created February 28, 2012 02:10
Printer selection in a Tkinter Python GUI using lpstat and test printing with lpr
#!/usr/bin/env python
from Tkinter import *
import sys, commands, os
root = Tk()
root.title('Printer Configuration')
root.config(bg="lightblue")
def getPrinter():
nIndex = printerList.curselection()[0]
@ofrzeta
ofrzeta / preseed.cfg
Last active May 10, 2019 14:14
Minmal preseed.cfg for Debian on KVM, German keyboard/timezone, auto LVM partitioning, serial console
d-i debian-installer/locale string en_US
d-i keymap select de
d-i keyboard-configuration/xkb-keymap select de
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/layoutcode string de
d-i netcfg/choose_interface select auto
d-i netcfg/get_hostname string debianhost
d-i netcfg/get_domain string mydomain
d-i netcfg/wireless_wep string
@okv
okv / gist:2b0d9b6c1c73c036cabc
Created July 22, 2014 10:29
Icinga2: Configuration Syntax Highlighting using Vim
PREFIX=~/.vim && mkdir -p $PREFIX/{syntax,ftdetect} && curl https://raw.githubusercontent.com/Icinga/icinga2/ec75e7dcbbf8c5650197a82107969936220707c8/tools/syntax/vim/syntax/icinga2.vim > $PREFIX/syntax/icinga2.vim && curl https://raw.githubusercontent.com/Icinga/icinga2/ec75e7dcbbf8c5650197a82107969936220707c8/tools/syntax/vim/ftdetect/icinga2.vim > $PREFIX/ftdetect/icinga2.vim
@AsaAyers
AsaAyers / crowd.php
Created July 31, 2011 00:17
PHP Crowd Authentication
<?php
/**
* This file demonstrates using Atlassian Crowd for Single Sign On.
*/
$crowd_app_name = 'REMOVED';
$crowd_app_password = 'REMOVED';
$crowd_url = 'http://crowd.REMOVED.com/crowd/services/SecurityServer?wsdl';
// http://pear.php.net/package/Services_Atlassian_Crowd
@aktau
aktau / debian-preseeded-iso.sh
Last active November 16, 2019 05:53
Create a preseeded (debian) hybrid ISO which can be burned to CD and dd'ed to a USB stick, don't forget to apt-get install xorriso isolinux
#!/bin/bash
set -e
set -u
# hat-tips:
# - http://codeghar.wordpress.com/2011/12/14/automated-customized-debian-installation-using-preseed/
# - the gist
@ralphsaunders
ralphsaunders / controller.php
Created August 29, 2011 08:41
Loading a view with templates in Codeigniter
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Site extends CI_Controller {
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/site
* - or -
@joshuaspence
joshuaspence / cloud.cfg
Created May 5, 2021 00:36
Default cloud-init configuration
# The top level settings are used as module
# and system configuration.
# A set of users which may be applied and/or used by various modules
# when a 'default' entry is found it will reference the 'default_user'
# from the distro configuration specified below
users:
- default
# If this is set, 'root' will not be able to ssh in and they
@ithoq
ithoq / dovecot-sieve.md
Created November 29, 2016 16:57
Postfix / Dovecot / Roundcube / Sieve

Postfix / Dovecot / Roundcube / Sieve

Installation

pkg install dovecot-pigeonhole

Postfix

master.cf

<?php
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* AES implementation in PHP */
/* (c) Chris Veness 2005-2011 www.movable-type.co.uk/scripts */
/* Right of free use is granted for all commercial or non-commercial use providing this */
/* copyright notice is retainded. No warranty of any form is offered. */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
class Aes {