Skip to content

Instantly share code, notes, and snippets.

View pavelmetalarm's full-sized avatar

Paul Novikov pavelmetalarm

View GitHub Profile
@webchi
webchi / ovpn-playbook.yaml
Created March 22, 2022 08:47
Openvpn by ansible
---
- name: Install ovpn
hosts: ovpn
become: true
gather_facts: true
roles:
- kyl191.openvpn
vars:
openvpn_ovpn_dir: /etc/openvpn/client
openvpn_server_hostname: <external-host-ip>
@dianjuar
dianjuar / i3-shortcuts-screenshot.md
Last active June 25, 2024 17:28
My i3 shortcuts to take screenshots

Requirements

  • maim
  • xclip

Set-up

Set this on your i3 config file ~/.i3/config

# Screenshots
@kimus
kimus / ufw.md
Created March 2, 2014 22:46
NAT and FORWARD with Ubuntu’s ufw firewall

UFW

I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.

Install UFW

if ufw is not installed by default be sure to install it first.

@lgelo
lgelo / diskinfo.py
Created February 7, 2014 16:00
Linux disk drive information
#!/usr/bin/env python
"""
Linux disk drive information: model, serial, firmare version
"""
import sys, os, fcntl, struct, glob
def list_devices(pattern = 'sd*'):
return [os.path.basename(d) for d in glob.glob('/sys/block/' + pattern)]
@lewg
lewg / block_china_ufw.sh
Created January 18, 2013 15:53
UFW blocks for China, Korea, Malaysia, Phillipines, Singapore, Thailand and Vietnam netblocks
#!/bin/sh
# UFW blocks for China, Korea, Malaysia, Phillipines, Singapore, Thailand and Vietnam netblocks
# Based on http://www.wizcrafts.net/chinese-iptables-blocklist.html
# Cambodia (KH)
ufw deny from 114.134.184.0/21 to any port 22
# Chinese (CN) IP addresses follow:
ufw deny from 1.192.0.0/13 to any port 22
ufw deny from 1.202.0.0/15 to any port 22