Skip to content

Instantly share code, notes, and snippets.

Avatar

Konstantin Novakovsky clickfreak

View GitHub Profile
@clickfreak
clickfreak / mount_qcow2.md
Created Apr 6, 2019 — forked from shamil/mount_qcow2.md
How to mount a qcow2 disk image
View mount_qcow2.md

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
View Mixxx_on_jackd_on_Fedora.md
sudo dnf install mixxx jack-audio-connection-kit-dbus qjackctl rtirq realTimeConfigQuickScan kernel-tools
sudo usermod -a -G audio,jackuser,users `whoami`

https://wiki.linuxaudio.org/wiki/system_configuration

$ cat /etc/security/limits.d/95-jack.conf:

@jackuser - rtprio 90
@clickfreak
clickfreak / fedora_jackd_mixxx.md
Created Sep 30, 2018
Mixxx over jackd on Fedora
View fedora_jackd_mixxx.md
sudo dnf install jack-audio-connection-kit-dbus qjackctl rtirq realTimeConfigQuickScan
sudo usermod -a -G audio,jackuser,users `whoami`
$ cat /etc/security/limits.d/95-jack.conf:

@jackuser - rtprio 90
@jackuser - nice -19
@jackuser - memlock 209715200
@clickfreak
clickfreak / Netfilter-IPTables-Diagrams.md
Created May 3, 2018 — forked from nerdalert/Netfilter-IPTables-Diagrams.md
Linux NetFilter, IP Tables and Conntrack Diagrams
View Netfilter-IPTables-Diagrams.md

Linux NetFilter, IP Tables and Conntrack Diagrams

IPTABLES TABLES and CHAINS

IPTables has the following 4 built-in tables.

1) Filter Table

Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.

@clickfreak
clickfreak / gist:6363333b5713274ccc6f7a1d6e57c6cb
Last active Dec 17, 2016
Get public ssh keys from github
View gist:6363333b5713274ccc6f7a1d6e57c6cb
#!/bin/sh
curl -s https://api.github.com/users/<username>/keys | jq -r ".[].key" > ~/.ssh/authorized_keys_github
@clickfreak
clickfreak / vscale_upload_zone.py
Last active Feb 9, 2016
Import dns zone into vscale domains
View vscale_upload_zone.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import json
import logging
import httplib
import argparse
@clickfreak
clickfreak / upload_dns_help.txt
Last active Oct 4, 2019
Import bind-zone file to Selectel DNS via API
View upload_dns_help.txt
usage: bind_upload.py [-h] --key <key> --name <name> --zone <zone>
Selectel domains-api bind-zone import helper
optional arguments:
-h, --help show this help message and exit
required named arguments:
--key <key> Your API Key
--name <name> Domain name for creation
@clickfreak
clickfreak / pypresender.py
Last active Aug 18, 2016
Resend udp packet to another host using pcap
View pypresender.py
#!/usr/bin/env python
import pcap
import socket
from scapy.all import *
conf.use_pcap=True # because by default scapy try to use raw socket and can't assign bpf filter
conf.verb=0 # it just grab all traffic and get error on processing
import scapy.arch.pcapdnet
@clickfreak
clickfreak / kernel_upgrade.yml
Created Jan 12, 2015
HWE kernel on ubuntu precise (Ansible playbook)
View kernel_upgrade.yml
---
- name: install HWE Stack on Ubuntu 12.04
hosts: all
user: someuser
sudo: yes
tasks:
- name: Install linux-hwe-generic package
apt: