Skip to content

Instantly share code, notes, and snippets.

View xiao99xiao's full-sized avatar

Xiao Xiao xiao99xiao

  • Rakuraku Tech
  • Saitama, Japan
View GitHub Profile
@xiao99xiao
xiao99xiao / gist:52cad05d0da93d299757
Created September 19, 2014 09:49
instatake html demo
<html>
<head>
<title>test</title>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js" type="text/javascript"></script>
<script src="./libs/jszip.js" type="text/javascript"></script>
<script src="./libs/FileSaver.js" type="text/javascript"></script>
<script src="./script.js" type="text/javascript"></script>
</head>
<body>
<input type="textfield" name="username" id="username" value="" />
@xiao99xiao
xiao99xiao / gist:0509091001bdd6259249
Created August 16, 2014 15:04
Creating XPC helper for root privilege
1. Add Copy File build phase, Destination: Wrapper, Subpath: Contents/Library/LaunchServices, Codesign on Copy:Disable.
2. Modify Info.plist for Both target:
2.1 Add "Tools owned after installation" in App's Info.plist, value is: identifier "<helper's bundle identifier>" and anchor apple generic and certificate leaf[subject.CN] = "<Certificate Name>" and certificate 1[field.1.2.840.113635.100.6.2.1] /* exists */
2.2 Add "Clients allowed to add and remove tool" in Helper's Info.plist, it is a array, so item 0's value is: identifier "<app's bundle identifier>" and anchor apple generic and certificate leaf[subject.CN] = "<Certificate Name>" and certificate 1[field.1.2.840.113635.100.6.2.1] /* exists */
2.3 Make sure each .plist file is set as Info.plist in Target's Build settings.