Skip to content

Instantly share code, notes, and snippets.

@Leask
Leask / MSO15.11.2Patch
Created July 16, 2015 13:44
MSO15.11.2Patch
#!/bin/bash
echo "Patching Microsoft Office Outlook..."
sudo perl -i.bak -pe 's|\x00\x0F\xA3\xCA\x72\x02\x31\xC0|\x00\x0F\xA3\xCA\x72\x02\x90\x90|' /Applications/Microsoft\ Outlook.app/Contents/Frameworks/MicrosoftSetupUI.framework/Versions/Current/MicrosoftSetupUI
sudo codesign -f -s - /Applications/Microsoft\ Outlook.app/Contents/Frameworks/MicrosoftSetupUI.framework
echo "Patching Microsoft Office Word..."
sudo perl -i.bak -pe 's|\x00\x0F\xA3\xCA\x72\x02\x31\xC0|\x00\x0F\xA3\xCA\x72\x02\x90\x90|' /Applications/Microsoft\ Word.app/Contents/Frameworks/MicrosoftSetupUI.framework/Versions/Current/MicrosoftSetupUI
sudo codesign -f -s - /Applications/Microsoft\ Word.app/Contents/Frameworks/MicrosoftSetupUI.framework
@perlmunger
perlmunger / Implemenation.swift
Last active March 3, 2022 01:45
Swift NSURLSession Check File Last Modified Date With HEAD Request
func checkShouldDownloadFileAtLocation(urlString:String, completion:((shouldDownload:Bool) -> ())?) {
var request = NSMutableURLRequest(URL: NSURL(string: urlString)!)
request.HTTPMethod = "HEAD"
var session = NSURLSession.sharedSession()
var err: NSError?
var task = session.dataTaskWithRequest(request, completionHandler: { [weak self] data, response, error -> Void in
if let strongSelf = self {
var isModified = false
@bobmoff
bobmoff / UIView+RoundedCorners.h
Created July 10, 2013 15:23
Add rounded corners to any view using layer mask.
#import <UIKit/UIKit.h>
@interface UIView (RoundedCorners)
- (void)setRoundedCorners:(UIRectCorner)corners radius:(CGSize)size;
@end