Skip to content

Instantly share code, notes, and snippets.

View shazron's full-sized avatar
😆

Shazron Abdullah shazron

😆
View GitHub Profile
@shazron
shazron / ios-deploy.lldb.patch
Last active December 22, 2015 19:08
patch for lldb support in ios-deploy
From d2378b8d4d3634bcfd29df9999dcc7d5ace77673 Mon Sep 17 00:00:00 2001
From: Connor Dunn <[email protected]>
Date: Fri, 30 Aug 2013 09:55:46 +0100
Subject: [PATCH] Use LLDB rather than GDB.
---
ios-deploy.c | 228 ++++++++++++++++++++++++++++++++++-------------------------
1 file changed, 130 insertions(+), 98 deletions(-)
diff --git a/ios-deploy.c b/ios-deploy.c
@shazron
shazron / ios7.phonegap.cordova.js
Last active June 9, 2025 07:29
PhoneGap / Apache Cordova - top margin for iOS 7
// Pre-requisites:
// 1. Device core plugin
// 2. Splashscreen core plugin (3.1.0)
// 3. config.xml: <preference name="AutoHideSplashScreen" value="false" />
// 4. config.xml: <preference name="DisallowOverscroll" value="true" />
function onDeviceReady() {
if (parseFloat(window.device.version) >= 7.0) {
document.body.style.marginTop = "20px";
// OR do whatever layout you need here, to expand a navigation bar etc
@shazron
shazron / debug.phonegap.md
Last active December 23, 2015 13:49
Debug PhoneGap Applications
  1. Use desktop Safari 7.x (for both a device and the iOS Simulator): http://moduscreate.com/enable-remote-web-inspector-in-ios-6/
  2. Use Adobe Edge Inspect (formerly known as Shadow), available on the free tier of Adobe Creative Cloud: http://html.adobe.com/edge/inspect/
  3. Use Weinre (you must self host), which Adobe Edge Inspect is based on: https://github.com/apache/cordova-weinre
  4. Use http://debug.phonegap.com, a hosted version of Weinre, part of Adobe PhoneGap Build's service. Don't forget to choose a guid only you know, if not other people can inspect your device!
  5. https://github.com/google/ios-webkit-debug-proxy/ (this is only last since I haven't used it to form an opinion. This allows you to use the Chrome Web Inspector)
@shazron
shazron / cb-5103.patch.md
Last active December 25, 2015 18:09
Patch Cordova 3.1.0 for CB-5103 (https://issues.apache.org/jira/browse/CB-5103)
  1. Make sure you have run this at least once in a created project to get the cordova-ios library:

     cordova platform add ios
  2. Run these commands to back up and patch the existing run script:

     cp -f ~/.cordova/lib/ios/cordova/3.1.0/bin/templates/scripts/cordova/run  ~/.cordova/lib/ios/cordova/3.1.0/bin/templates/scripts/cordova/run.orig
     curl https://raw.github.com/csantanapr/cordova-ios/fb5428d01b1469a783959ac5b251cf27d340102a/bin/templates/scripts/cordova/run > ~/.cordova/lib/ios/cordova/3.1.0/bin/templates/scripts/cordova/run

Now, when you create a new project, it will contain the updated script. If you want to just replace the existing script in an already created project, just replace the platforms/ios/cordova/run file with the ~/.cordova/lib/ios/cordova/3.1.0/bin/templates/scripts/cordova/run file.

@shazron
shazron / list_connected_ios_devices.sh
Created April 3, 2014 23:15
List connected iOS devices
system_profiler SPUSBDataType | sed -n -e '/iPad/,/Serial/p' -e '/iPhone/,/Serial/p' | grep "Serial Number:" | awk -F ": " '{print $2}'
@shazron
shazron / gist:10078653
Created April 8, 2014 00:52
WWDC 2014 Rejection Email
Subject: Your WWDC Ticket Status
Dear Developer,
Thank you for registering for the random selection process to attend WWDC 2014.
Unfortunately, you were not selected to purchase a ticket. However, you can still take advantage of great WWDC content. We'll be posting session videos, slides, and sample code throughout the week for all Registered Apple Developers.
We appreciate your support.
@shazron
shazron / APPLE-SA-2014-09-17-1 iOS 8
Created September 17, 2014 17:49
APPLE-SA-2014-09-17-1 iOS 8
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
APPLE-SA-2014-09-17-1 iOS 8
iOS 8 is now available and addresses the following:
802.1X
Available for: iPhone 4s and later,
iPod touch (5th generation) and later, iPad 2 and later

Keybase proof

I hereby claim:

  • I am shazron on github.
  • I am shazron (https://keybase.io/shazron) on keybase.
  • I have a public key whose fingerprint is 1C9F D65D 7D92 4C08 D504 3CB0 24C3 1ABC B01A AC82

To claim this, I am signing this object:

@shazron
shazron / gist:484744630efcd5456e7b
Created October 7, 2014 20:57
__git_ps1 Yosemite .bash_profile
source `xcode-select --print-path`/usr/share/git-core/git-completion.bash
source `xcode-select --print-path`/usr/share/git-core/git-prompt.sh
@shazron
shazron / error.html
Created October 23, 2014 20:37
cordova-ios 3.7.0 error page
<!DOCTYPE html>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at