Skip to content

Instantly share code, notes, and snippets.

@1951FDG
1951FDG / new_gist_file.sh
Created October 16, 2013 15:23
Remove Silverlight
/Applications/Microsoft\ Silverlight
/Library/Application\ Support/Microsoft/PlayReady
/Library/Application\ Support/Microsoft/Silverlight
/Library/Internet\ Plug-Ins/Silverlight.plugin
/private/var/db/receipts/com.microsoft.SilverlightInstaller.bom
/private/var/db/receipts/com.microsoft.SilverlightInstaller.plist
/Users/administrator/Library/Application\ Support/Microsoft/Silverlight
/Users/administrator/Library/Preferences/com.microsoft.silverlight.plist
@1951FDG
1951FDG / new_gist_file.sh
Created October 16, 2013 16:31
Examples using kextfind
kextfind -relative-paths -arch x86_64 -not -arch i386
kextfind -relative-paths -arch i386 -not -arch x86_64
kextfind -relative-paths -arch-exact ppc
kextfind -relative-paths -f /Library/Extensions
kextfind -relative-paths -case-insensitive -loaded -not -bundle-id -substring 'com.apple.'
kextfind -relative-paths -case-insensitive -not -bundle-id -substring 'com.apple.'
@1951FDG
1951FDG / new_gist_file
Created October 16, 2013 16:46
Time code macro's
#import <mach/mach_time.h>
#define startTimer(e) uint64_t e = mach_absolute_time();
#define stopTimer(f, e, d) uint64_t f = mach_absolute_time(); printf("Total execution time for task named '%s': %g s\n", [d UTF8String], ((double)(f - e) / (double)NSEC_PER_SEC));
startTimer(baba);
stopTimer(bab1, baba, @"myTimerName");
#define JJLog(f, e, d) uint64_t f = mach_absolute_time(); printf("Total execution time for task named '%s': %llu ns\n", [d UTF8String], f - e);
#define JJLog(f, e) uint64_t f = mach_absolute_time(); printf("%s:%i %s:%llu\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, f - e);
@1951FDG
1951FDG / new_gist_file
Created October 17, 2013 09:55
OpenSSL backwards compatibility
If a project’s build system references a specific version of OpenSSL, the project may need to be updated. For example, if an Xcode project references “/usr/lib/libcrypto.0.9.7.dylib” or “-lcrypto.0.9.7”, this should be changed to “/usr/lib/libcrypto.dylib” or “-lcrypto” respectively.
@1951FDG
1951FDG / new_gist_file
Created October 17, 2013 10:05
Fix expired package
Failed install preflight: Error Domain=PKInstallErrorDomain Code=102 UserInfo=0x1b397c90 "The package “iPhoneSystemComponents.pkg” is untrusted." Underlying Error=(Error Domain=NSOSStatusErrorDomain Code=-2147409654 UserInfo=0x1b371bb0 "The operation couldn’t be completed. CSSMERR_TP_CERT_EXPIRED")
Failed install preflight: Error Domain=PKInstallErrorDomain Code=102 UserInfo=0x1ee540 "The package “MobileDevice.pkg” is untrusted." Underlying Error=(Error Domain=NSOSStatusErrorDomain Code=-2147409654 UserInfo=0x1b1360 "The operation couldn’t be completed. CSSMERR_TP_CERT_EXPIRED")
@1951FDG
1951FDG / new_gist_file
Last active December 10, 2017 16:01
Download from ADC using script
http://adcdownload.apple.com/Developer_Tools/xcode_3.2.6_and_ios_sdk_4.3__final/xcode_3.2.6_and_ios_sdk_4.3.dmg
@1951FDG
1951FDG / new_gist_file
Created October 17, 2013 10:51
Disable virtual CD- ROM drive on Huawei
AT+CGDCONT=1,"IP","web.digicelaruba.com"\13
*99***1#
web.digicelaruba.com
Generic
GPRS (GSM/3G)
@1951FDG
1951FDG / new_gist_file.sh
Last active December 10, 2017 16:01
Make uncrustify
cd ~/Developer
git clone https://github.com/bengardner/uncrustify.git
cd uncrustify
./autogen.sh
./configure
xcodebuild -configuration Release -alltargets clean;xcodebuild -configuration Release
make clean all
@1951FDG
1951FDG / new_gist_file.sh
Created October 18, 2013 10:17
Clone BBUncrustifyPlugin
cd /Volumes/Untitled/Users/administrator/Developer
git clone [email protected]:1951FDG/BBUncrustifyPlugin-Xcode.git
cd BBUncrustifyPlugin-Xcode
git remote -v
git remote add upstream git://github.com/benoitsan/BBUncrustifyPlugin-Xcode.git
git push origin master
@1951FDG
1951FDG / new_gist_file.sh
Last active December 7, 2018 15:36
Everything SixtyFour
~/Developer/DeploymentScripts/DeploymentSixtyFour.sh ~/Developer/SixtyFour/SixtyFour.xcodeproj
~/Developer/DeploymentScripts/DeploymentSixtyFour.sh ~/Developer/SixtyFour/SixtyFour.xcodeproj "SixtyFour copy"
~/Developer/Dropbox-Uploader/dropbox_uploader.sh upload ~/Desktop/SixtyFour\ 1.0.zip /Public/SixtyFour\ 1.0.zip
sudo chgrp procmod ~/Developer/SixtyFour/build/Release/SixtyFour.app/Contents/MacOS/SixtyFour
sudo chmod g+s ~/Developer/SixtyFour/build/Release/SixtyFour.app/Contents/MacOS/SixtyFour