<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
| /* | |
| * An example of | |
| * 1. Using the YUI 3 module system to encapsulate a custom class for reuse | |
| * 2. Creating a Plugin class | |
| * 3. Using Y.Base.create to generate the class | |
| */ | |
| // YUI.add( | |
| // "dash-separated-module-name", | |
| // function (Y) { Y.MyModule = ...; }, |
| YUI.add('datatable-events', function (Y) { | |
| var isString = Y.Lang.isString; | |
| Y.Plugin.DataTableEvents = Y.Base.create('dataTableEvents', Y.Plugin.Base, [], { | |
| initializer: function () { // Or possibly this.afterHostMethod('bindUI', this._initEvents); | |
| this.get('host').after('render', this._initEvents, this); | |
| }, |
| YUI.add('datatable-events', function (Y) { | |
| Y.Plugin.DataTableEvents = Y.Base.create('dtevents', Y.Plugin.Base, [], { | |
| initializer: function (config) { | |
| this.afterHostMethod('bindUI', function () { | |
| this._bindEvents(this.get('events')); | |
| this.after('eventsChange', this._afterEventsChange); | |
| }); | |
| }, |
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Test Page</title> | |
| <style> | |
| .yui3-skin-sam .yui3-datatable .yui3-datatable-data .yui3-datatable-editing { | |
| position: relative; | |
| padding: 0; | |
| } |
| import os.path, base64 | |
| from ctypes import CDLL, Structure, POINTER, byref, addressof, create_string_buffer, c_int, c_uint, c_ubyte, c_void_p, c_size_t | |
| from CoreFoundation import kCFStringEncodingUTF8 | |
| # Wheee! | |
| Security = CDLL('/System/Library/Frameworks/Security.Framework/Versions/Current/Security') | |
| # I don't use the pyObjC CoreFoundation import because it attempts to bridge between CF, NS, and python. | |
| # When you try to mix it with Security.Foundation (pure C / CF), you get nasty results. | |
| # So I directly import CoreFoundation to work with CFTypes to keep it pure of NS/python bridges. | |
| CFoundation = CDLL('/System/Library/Frameworks/CoreFoundation.Framework/Versions/Current/CoreFoundation') |
| #!/bin/sh | |
| # | |
| # Trigger an update of MAS (and softwareupdate) apps | |
| # | |
| # This seems to be all that's needed to schedule an immediate update of | |
| # MAS apps. This should be run as a normal user. You can run this and | |
| # tail the install log to get an idea of what's happening. | |
| # | |
| # You can also take a look at this user's ~/Library/Caches/com.apple.storagent | |
| # directory to get a report on what apps were available, installable, etc. |
| # Skip to the end to see what this can do. | |
| # | |
| # http://s.sudre.free.fr/Stuff/Ivanhoe/FLAT.html | |
| # Flat packages are xar files with a particular structure | |
| # We're looking for the PackageInfo file within the xar file | |
| import urllib2, ctypes, zlib | |
| import xml.etree.ElementTree as ET | |
| class SimpleObj(object): |
| # Pure python reimplementation of .cpio.xz content extraction from pbzx file payload originally here: | |
| # http://www.tonymacx86.com/general-help/135458-pbzx-stream-parser.html | |
| # | |
| # Cleaned up C version (as the basis for my code) here, thanks to Pepijn Bruienne / @bruienne | |
| # https://gist.github.com/bruienne/029494bbcfb358098b41 | |
| # Example usage: | |
| # parse_pbzx('PayloadJava', 'PayloadJava.cpio.xz') | |
| # Updated for speeeeeeeeeeeeed |