Skip to content

Instantly share code, notes, and snippets.

💭
free 4 ever

Aysad Kozanoglu AysadKozanoglu

💭
free 4 ever
View GitHub Profile
View nginx_proxy_pass_to_HTTPS
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 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
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}
View bashrc_template.sh
#
# 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
View apt-mirror-install.sh
#!/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 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
AysadKozanoglu / kvm-libvirt-restart-network.sh
Created Dec 4, 2019
Effectively restarting kvm/libvirt network
View kvm-libvirt-restart-network.sh
#!/bin/bash
# Author: Aysad Kozanoglu
# Effectively restarting kvm/libvirt network
set -e
set -u
NET_NAME=default
# NET_HOOK=/etc/libvirt/hooks/qemu
View default-iptables-rules-kvm.sh
# 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]
View debian8_9_10_bower_install.sh
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 Sep 10, 2019
RocketChat Jira webhook Integration
View RocketChat_Jira_webhook_Integration.md

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

You can’t perform that action at this time.