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
import boto3 | |
import collections | |
import datetime | |
ec = boto3.client('ec2') | |
# inspired by https://serverlesscode.com/post/lambda-schedule-ebs-snapshot-backups/ | |
# | |
# snapshot deletion lambda | |
# this function deletes snapshots backed up by the EBSSnapshotterCreator |
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
import boto3 | |
import collections | |
import datetime | |
ec = boto3.client('ec2') | |
# inspired by https://serverlesscode.com/post/lambda-schedule-ebs-snapshot-backups/ | |
# | |
# snapshot creation lambda | |
# this function creates snapshots |
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
- (IBAction)getImageFromWeb:(id)sender { | |
// grab the width and height of the document in our mobileView. | |
CGSize contentSize = CGSizeMake( | |
[[mobileView stringByEvaluatingJavaScriptFromString:@"document.body.scrollWidth;"] floatValue], | |
[[mobileView stringByEvaluatingJavaScriptFromString:@"document.body.scrollHeight;"] floatValue] | |
); | |
// create a new window, offscreen. | |
NSWindow *hiddenWindow = [[NSWindow alloc] initWithContentRect: NSMakeRect( -1000,-1000, contentSize.width, contentSize.height ) | |
styleMask: NSTitledWindowMask | NSClosableWindowMask backing:NSBackingStoreNonretained defer:NO]; |
NewerOlder