Using diff to create a patch in Linux
Create the patch: diff -aru file.orig file > file.patch Apply the patch (-b creates a copy of the original with a .orig extension): patch -b file file.patch
Create the patch: diff -aru file.orig file > file.patch Apply the patch (-b creates a copy of the original with a .orig extension): patch -b file file.patch
Source is now in github, please help me make it better! If you just want a 32-bit binary (to run on Dom0), download it from here instead. With the help of Ben Booth’s Xen::API (Perl module) I put together a VM migration script to export a VM directly to another host with no intermediary file. […]
Supermicro X9SCM and X9SCL main boards will lose network connection after some heavy traffic, especially on RHEL/CentOS 6. Updating BIOS and driver will not always fix this: Oct 19 18:32:49 zeus kernel: ————[ cut here ]———— Oct 19 18:32:49 zeus kernel: WARNING: at net/sched/sch_generic.c:267 dev_watchdog+0x26d/0x280() (Not tainted) Oct 19 18:32:49 zeus kernel: Hardware name: X9SCL/X9SCM […]
DOS Example: 1. Using the DOS MegaCLI (note: the -a0 indicates adapter zero): MegaCli -adpfwflash -f <romfile> -NoVerChk -a0 2. Then set to factory defaults: MegaCli -adpfacdefset -a0
Sometimes you need to run another service on port 80 or 443, but IIS binds to every IP by default. Here’s the trick to add/remove IP’s from IIS 7.5. It cannot be done by any web GUI. netsh http add iplisten ipaddress=1.2.3.4 netsh http del iplisten ipaddress=2.3.4.5 netsh http show iplisten
Here’s a nice recipe for a RAID10 array comprised of 4x SSD disks. Tested to work on CentOS 6 (RHEL 6). Be sure to add the discard option in fstab for Trim support. zerombr yes bootloader –location=partition –driveorder=sda,sdb,sdc,sdd clearpart –all –initlabel –drives=sda,sdb,sdc,sdd part raid.100000 –size=250 –ondisk=sda part raid.100001 –size=250 –ondisk=sdb part raid.100002 –size=250 –ondisk=sdc part […]
If for some reason Cpanel’s database cache is out of sync and you can’t remove or delete non-existant databases, you can do so manually: Remove orphaned DB entries from: /var/cpanel/databases/dbindex.db Same here: /var/cpanel/databases/<username>.yaml Then execute the following: /usr/local/cpanel/bin/setupdbmap /scripts/update_db_cache
If a perl module is failing harmless tests and refuses to install, you can force it to with this snippet: perl -MCPAN -e “CPAN::Shell->force(qw(install IO::Socket::SSL));”
Install some prerequisites: yum groupinstall “Development Libraries” “Development Tools” yum install mercurial python-devel dev86 iasl ncurses-devel ncurses \ glib2-devel glib2 openssl-devel yajl-devel libuuid-devel libuuid \ pciutils-devel pciutils texinfo kernel-xen bridge-utils gnutls gnutls-devel \ libxml2 libxml2-devel libnl libnl-devel libxslt libxslt-devel pygtk2 xorg-x11-xauth \ xorg-x11-fonts* device-mapper* gnome-python2-gconf pygtk2-libglade dbus-x11 \ gtk-vnc-python netcf netcf-devel netcf-libs vte vte-devel Pull […]
Spider KVM’s are already very cool as they are — KVM, virtual media, and serial console with a flawless web/Java client. But if you strap on a Wifi bridge, it’s way cooler. As a bonus you get wireless network access via the Cascade port — anyone who has done an emergency router or switch replacement […]