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
location / {
proxy_pass https://example.de;
proxy_http_version 1.1;
proxy_set_header Accept-Encoding "";
proxy_set_header Cache-Control no-cache;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header X-Real-IP $remote_addr;
proxy_ssl_server_name on;
}
@AysadKozanoglu
AysadKozanoglu / .ssh-agent_bashrc
Created February 24, 2020 15:19
Sharing the same `ssh-agent` among multiple login sessions
# put the following code to your .bashrc
# Sharing the same `ssh-agent` among multiple login sessions
SSH_ENV=$HOME/.ssh/environment
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: aysadx@gmail.com
#
# 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
@AysadKozanoglu
AysadKozanoglu / apt-mirror-install.sh
Created December 9, 2019 22:40
apt mirror config
#!/bin/sh
# 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
apt-mirror
@AysadKozanoglu
AysadKozanoglu / rc-local.service
Last active December 5, 2019 22:10
execute rc.local on boot startup on systemd OS types
#
# 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
AysadKozanoglu / kvm-libvirt-restart-network.sh
Created December 4, 2019 10:22
Effectively restarting kvm/libvirt network
#!/bin/bash
# Author: Aysad Kozanoglu
# Effectively restarting kvm/libvirt network
set -e
set -u
NET_NAME=default
# 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
*mangle
:PREROUTING ACCEPT [156866:19045743]
:INPUT ACCEPT [156851:19044573]
:FORWARD ACCEPT [0:0]
apt-get update && apt-get -y install software-properties-common
curl -sL https://deb.nodesource.com/setup_10.x | bash -
apt-get -y install nodejs && npm install -g bower
which bower && bower -v
@AysadKozanoglu
AysadKozanoglu / RocketChat_Jira_webhook_Integration.md
Last active September 10, 2019 14:03
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