John Gruber on MacBreak Weekly
Exclusive: Adobe ceases development on mobile browser Flash, refocuses efforts on HTML5
extension String { | |
var localized: String { | |
return NSLocalizedString(self, comment: "") | |
} | |
} | |
// Which allows for: | |
"Hello world".localized |
var states = new List<SelectListItem> { | |
new SelectListItem { Value = "AL", Text = "Alabama" }, | |
new SelectListItem { Value = "AK", Text = "Alaska" }, | |
new SelectListItem { Value = "AZ", Text = "Arizona" }, | |
new SelectListItem { Value = "AR", Text = "Arkansas" }, | |
new SelectListItem { Value = "CA", Text = "California" }, | |
new SelectListItem { Value = "CO", Text = "Colorado" }, | |
new SelectListItem { Value = "CT", Text = "Connecticut" }, | |
new SelectListItem { Value = "DE", Text = "Delaware" }, | |
new SelectListItem { Value = "FL", Text = "Florida" }, |
import axios from 'axios'; | |
import Bell from 'bell'; | |
import Boom from 'boom'; | |
import Joi from 'joi'; | |
const harvestProvider = (options) => { | |
const validated = Joi.validate(options, Joi.object({ | |
domain: Joi.string() | |
.hostname() | |
.required(), |
var tag = 'div', | |
attrs = { className: 'foo', id: 'bar' }, | |
slice = Array.prototype.slice; | |
isContent = function(c) { | |
var un = "undefined"; | |
return c !== null && typeof c !== un && | |
(typeof c.nodeType !== un || | |
typeof c === "string"); | |
} |
tell application "System Events" | |
tell process "StudioTether" | |
click button 2 of window "D300" | |
end tell | |
end tell |
-- Appropriated from: http://hints.macworld.com/article.php?story=20041104011839378 | |
on adding folder items to this_folder after receiving these_items | |
try | |
tell application "Finder" | |
repeat with i from 1 to number of items in these_items | |
try | |
set this_item to item i of these_items | |
set the path_string to this_item as string | |
set the final_path to POSIX path of the path_string | |
do shell script "/usr/bin/lp '" & final_path & "'" |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Xml; | |
// Compile and run via the command line: | |
// > XmlFormatter.exe < BadXml.xml > GoodXml.xml | |
// If GoodXml is ignored, it will print to stdout. |
do shell script "/Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome --allow-ssl-mitm-proxies" | |
-- This is to disable the feature in Chrome 6 that causes the "Error 128 (net::ERR_SSL_UNSAFE_NEGOTIATION)" | |
-- when behind an Internet filter that modifies the request to an https Url. | |
-- Copy it to AppleScript and save it as an application to easily run. | |
-- Make sure that there are no other Chrome windows open when you run this. |
Process: Xcode [1419] | |
Path: /Applications/Xcode.app/Contents/MacOS/Xcode | |
Identifier: com.apple.dt.Xcode | |
Version: 6.2 (6776) | |
Build Info: IDEFrameworks-6776000000000000~11 | |
App Item ID: 497799835 | |
App External ID: 811890240 | |
Code Type: X86-64 (Native) | |
Parent Process: ??? [1] | |
Responsible: Xcode [1419] |