Skip to content

Instantly share code, notes, and snippets.

View toli-belo's full-sized avatar

Anatolii B toli-belo

View GitHub Profile
@tliron
tliron / bind-port-privilege.sh
Created April 5, 2016 18:29
Give Linux executables the privilege to bind to ports below 1024
#!/bin/bash
if (( $# != 2 )); then
echo 'Control whether an executable has the privilege to bind to ports < 1024, even if the user is not root'
echo
echo "Usage: $(basename "$0") [enable|disable|status] [path-to-exectuable]"
exit 1
fi
FILE=$(readlink -f "$2")
@dperelman
dperelman / ligature_xml_to_list.py
Created March 21, 2015 00:54
List ligatures in .ttx file.
#!/usr/bin/env python
# This takes in just the ligatures section of a .ttx file:
# USAGE: sed -n '/<LigatureSubst /,/<\/LigatureSubst>/p' FOO.ttx \
# | ./ligature_xml_to_list.py
from __future__ import print_function
import lxml.etree
import sys