Skip to content

Instantly share code, notes, and snippets.

View dennisxiaoding's full-sized avatar

Dennis dennisxiaoding

  • Suzhou
View GitHub Profile
@kevinelliott
kevinelliott / osx-10.10-setup.md
Last active March 29, 2025 07:56
Mac OS X 10.10 Yosemite Setup

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

@fireblue
fireblue / UIWebView+Screenshot.m
Last active November 1, 2016 02:28
Find a certain element in UIWebView and make a screenshot. :)
-(UIImage *)screenShot
{
CGRect originalFrame = self.frame;
CGPoint originalOffset = self.scrollView.contentOffset;
CGSize entireSize = [self sizeThatFits:CGSizeZero];
[self setFrame: CGRectMake(0, 0, entireSize.width, entireSize.height)];
CGRect rect = [self positionOfElementWithId:@"post1"];
//如果没有找到这个元素,就取整个页面
if (rect.origin.y != 0) {