This file contains 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
// Example: | |
// | |
// Widont makes the last space non-breaking | |
// so you don't end up with one word on its | |
// own. | |
// | |
// Widont makes the last space non-breaking | |
// so you don't end up with one word on | |
// its own. | |
// |
This file contains 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
@interface UIView (Bryan) | |
- (void)updateFrame:(void (^)(CGPoint *origin, CGSize *size))block; | |
@end | |
@implementation UIView (Bryan) | |
- (void)updateFrame:(void (^)(CGPoint *origin, CGSize *size))block { | |
CGRect frame = self.frame; |
This file contains 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 | |
VM=$1 | |
size=`sudo lvs -o lv_size --unit=b --noheadings /dev/vg_vms/ubuntu-base-vm | sed 's/^ *//'` | |
echo size=$size | |
sudo lvcreate --size=$size --name=vms-$VM vg_vms | |
sudo virt-resize --expand sda1 \ | |
/dev/vg_vms/ubuntu-base-vm /dev/vg_vms/vms-$VM | |
mkdir -p tmp | |
virsh dumpxml ubuntu-base-vm > tmp/ubuntu-base-vm.xml |