Skip to content

Instantly share code, notes, and snippets.

Aysad Kozanoglu AysadKozanoglu

Block or report user

Report or block AysadKozanoglu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
AysadKozanoglu / .ssh-agent_bashrc
Created Feb 24, 2020
Sharing the same `ssh-agent` among multiple login sessions
View .ssh-agent_bashrc
# put the following code to your .bashrc
# Sharing the same `ssh-agent` among multiple login sessions
function start_agent {
echo "Initialising new SSH agent..."
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > ${SSH_ENV}
echo succeeded
chmod 600 ${SSH_ENV}
# aurhor: Aysad Kozanoglu
# email:
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# Author: Aysad Kozanoglu
# Dists: debian 9, 10 (stretch buster)
# ubuntu 18 and above
which apt-get && apt-get install -y --yes apt-mirror || apt install apt-mirror -y --yes
AysadKozanoglu / rc-local.service
Last active Dec 5, 2019
execute rc.local on boot startup on systemd OS types
View rc-local.service
# file: rc-local.service
# author: Aysad Kozanoglu
# OS types: systemd
# Description
# ============
# execute rc.local on boot startup
# systemd-rc-local-generator if /etc/rc.local is executable.
AysadKozanoglu /
Created Dec 4, 2019
Effectively restarting kvm/libvirt network
# Author: Aysad Kozanoglu
# Effectively restarting kvm/libvirt network
set -e
set -u
# NET_HOOK=/etc/libvirt/hooks/qemu
# creator : Aysad Kozanoglu
# Generated by iptables-save v1.6.0
# to restore default iptable rules
# iptables-restore < iptables-kvm.rules
# iptables-kvm.rules
:PREROUTING ACCEPT [156866:19045743]
:INPUT ACCEPT [156851:19044573]
apt-get update && apt-get -y install software-properties-common
curl -sL | bash -
apt-get -y install nodejs && npm install -g bower
which bower && bower -v
AysadKozanoglu /
Last active Sep 10, 2019
RocketChat Jira webhook Integration

notify on issue creation, deletion and status, resolution, comment or priority changes.

  1. In Rocket.Chat go to “Administration”->”Integrations” and create “New Integration”
  2. Choose Incoming WebHook
  3. Follow all instructions like Enable, give it a name, link to channel etc. Set “Enable Script” to true and enter content of this script in the “Script” box
  4. Press Save changes and copy the Webhook URL (added just below the script box)
  5. Go to your jira as administrator and follow instructions on adding outgoing webhook here

You can tweak the content of the script to better suit your needs Add Jira integration via Outgoing WebHook

AysadKozanoglu / wp.config.php
Created May 30, 2019
Disable admin-ajax on the front-end of WordPress sites and cache the resulting 404.
View wp.config.php
strpos( $_SERVER['HTTP_REFERER'], 'wp-admin' ) === false &&
strpos( $_SERVER['REQUEST_URI'], 'admin-ajax.php' ) !== false
) {
header( 'Cache-Control: max-age=30000, must-revalidate' );
header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', strtotime( '+5000 minutes' ) ) . ' GMT' );
header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s', strtotime( '-5000 minutes' ) ) . ' GMT' );
header( $_SERVER["SERVER_PROTOCOL"]." 404 Not Found" );
AysadKozanoglu /
Created May 28, 2019 — forked from fxkraus/
Install LSI MegaCli .deb package on Debian/Ubuntu




You can’t perform that action at this time.