Skip to content

Instantly share code, notes, and snippets.

free 4 ever

Aysad Kozanoglu AysadKozanoglu

free 4 ever
View GitHub Profile
AysadKozanoglu /
Created May 28, 2019 — forked from fxkraus/
Install LSI MegaCli .deb package on Debian/Ubuntu




AysadKozanoglu / nginx.conf
Created Nov 15, 2018 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
View nginx.conf
# CORS header support
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
# include cors_support;
# As of Nginx 1.7.5, add_header supports an "always" parameter which
AysadKozanoglu /
Created Aug 8, 2018 — forked from shamil/
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
AysadKozanoglu / sample.ovpn
Created Apr 3, 2018 — forked from seuros/sample.ovpn
Sample OpenVPN client config
View sample.ovpn
dev tun
proto tcp
remote 1194
resolv-retry infinite
ca [inline]
cert [inline]
AysadKozanoglu / vrrp keepalived status
Last active Mar 12, 2018 — forked from agustik/vrrp
simple keepalived status script for 2 interfaces
View vrrp keepalived status
# for Debian Jessie
content=$(egrep '(vrrp_instance|interface|virtual_ipaddress)' -A1 $configfile | egrep -v "(\-\-|track_|virtual_)" | grep -A6 vrrp_);
#echo "$content";
AysadKozanoglu / graphite_send
Created Oct 8, 2017 — forked from skx/graphite_send
Shell script to submit "metrics" to graphite.
View graphite_send
# About
# -----
# This script sends simple system-metrics to a remote graphite server.
# Metrics
# -------
# The metrics currently include the obvious things such as:

Linux simple performance tweaks

Change the I/O Scheduler

Open $ vim /etc/default/grub then add elevator=noop next to GRUB_CMDLINE_LINUX_DEFAULT. Run $ update-grub and $ cat /sys/block/sda/queue/scheduler to be sure that noop is being used:

$ vim /etc/default/grub
$ update-grub
$ cat /sys/block/sda/queue/scheduler
[noop] deadline cfq
AysadKozanoglu /
Created Jul 19, 2017 — forked from nepsilon/
Using auto backup with Vim — First published in issue #3

Using auto backup with Vim

Not using versioning on your configuration files and editing them with Vim? Use Vim’s backup option to automatically keep a copy of past versions:

To put in your ~/.vimrc:

"Turn on backup option
set backup
AysadKozanoglu /
Created Jan 30, 2017 — forked from olasd/
Stream video to youtube via ffmpeg
#! /bin/bash
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://" # URL de base RTMP youtube
AysadKozanoglu / crossdomain.conf
Created Jan 30, 2017 — forked from rbranson/crossdomain.conf
nginx Flash XML policy server
View crossdomain.conf
# Add this to your nginx.conf under http { }
server {
listen 843;
server_name localhost;
location / {
rewrite ^(.*)$ /crossdomain.xml;