This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# synclient-to-x.py - export synclient -l output to | |
# x.org config file [c] jamespo [at] gmail [dot] com | |
# USAGE: synclient -l | ./synclient-to-x.py > 50-synaptics.conf | |
from __future__ import print_function | |
import fileinput | |
print(""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# smtpsend.py - mailx style tool with SMTP support | |
import smtplib | |
from optparse import OptionParser | |
import sys | |
from email.mime.text import MIMEText | |
def send_mail(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Location /> | |
# Insert filter | |
SetOutputFilter DEFLATE | |
# Don't compress images | |
SetEnvIfNoCase Request_URI \ | |
\.(?:gif|jpe?g|png)$ no-gzip dont-vary | |
# Make sure proxies don't deliver the wrong content | |
Header append Vary User-Agent env=!dont-vary |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
'''parsephpchain.py - parse phpchain XML export to CSV''' | |
import xml.etree.ElementTree as ET | |
import sys | |
def parse(file): | |
tree = ET.parse(file) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd /etc/sysconfig/network-scripts | |
for if in ifcfg-eth0* | |
do | |
if [[ ! $if =~ "backup" ]]; then | |
ifup ${if/ifcfg-} | |
echo $if | |
fi |
NewerOlder