git format-patch -1 <sha>
OR
git format-patch -1 HEAD
git apply --stat file.patch # show stats.
git apply --check file.patch # check for error before applying
| <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> | |
| <!-- ... --> | |
| <qemu:commandline> | |
| <qemu:arg value='-acpitable'/> | |
| <qemu:arg value='file=/some/path/slic.bin'/> | |
| <qemu:arg value='-acpitable'/> | |
| <qemu:arg value='file=/some/path/msdm.bin'/> | |
| <qemu:arg value='-smbios'/> | |
| <qemu:arg value='file=/some/path/smbios_type_0.bin'/> | |
| <qemu:arg value='-smbios'/> |
| # source: https://forum.proxmox.com/threads/removing-deleting-a-created-cluster.18887/ | |
| #/bin/sh | |
| # stop service | |
| systemctl stop pvestatd.service | |
| systemctl stop pvedaemon.service | |
| systemctl stop pve-cluster.service | |
| systemctl stop corosync | |
| systemctl stop pve-cluster | |
| killall pmxcfs |
| # use ImageMagick convert | |
| # the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf | |
| convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf |
| [Unit] | |
| Description=sshuttle service a permanent tunnel | |
| After=network.target | |
| [Service] | |
| ExecStart=/usr/bin/sshuttle -r h4s@localhost:39111 0.0.0.0/0 --dns -D --pidfile=/var/run/sshuttle.pid -e 'ssh -i /home/h4s/.ssh/whtunnel2' | |
| Restart=always | |
| Type=forking | |
| PIDFile=/var/run/sshuttle.pid |
| /* recursive mkdir based on | |
| http://nion.modprobe.de/blog/archives/357-Recursive-directory-creation.html | |
| */ | |
| #include <unistd.h> | |
| #include <sys/types.h> | |
| #include <sys/stat.h> | |
| #include <string.h> | |
| #define PATH_MAX_STRING_SIZE 256 |
| #!/bin/sh | |
| # I put all my dev stuff in here | |
| export DEV_PREFIX=$HOME/Dev/ | |
| # Don't forget to adjust this to your NDK path | |
| export ANDROID_NDK=${DEV_PREFIX}/android-ndk-r8d/ | |
| export CROSS_COMPILE=arm-linux-androideabi |
| public class RetrierTest { | |
| private static int count = 0; | |
| @Rule public RetryRule rule = new RetryRule(); | |
| @Test | |
| @Retry | |
| public void failsFirst() throws Exception { | |
| count++; | |
| assertEquals(2, count); |