I hereby claim:
- I am jfahrenkrug on github.
- I am jfahrenkrug (https://keybase.io/jfahrenkrug) on keybase.
- I have a public key whose fingerprint is BE25 078F A534 3D3F E12D B915 3105 2A52 D4CA A081
To claim this, I am signing this object:
| SC.run(function() { | |
| COS.apps.github = {path: 'http://www.github.com', requiredServices: ["ubiquity"]}; | |
| COS.appsController._appsInfo.github = COS.AppInfo.create(COS.apps.github); | |
| var github = {name: 'github', icon: 'http://ripthejacker.github.com/images/github_icon.png'}; | |
| var c = { | |
| maskAsset: "/system/cloudos/en-us/14F/source/resources/images/mask.png", | |
| warningArrowAsset: "/system/cloudos/en-us/14F/source/resources/images/warning_arrow.png", | |
| shadowAsset: "/system/cloudos/en-us/14F/source/resources/images/shadow.png", | |
| focusAsset: "/system/cloudos/en-us/14F/source/resources/images/app_icon_ring.png", |
| # encoding: utf-8 | |
| # Find unused and invalid Radiant CMS snippets | |
| # @author Johannes Fahrenkrug | |
| class DeadSnippetsFinder | |
| SNIPPET_REGEX = /\<r\:snippet\s+name\=[\"\']([\w\d\:\-]+)[\"\']/ | |
| def self.scan(obj, field = 'id') | |
| puts " #{field}: #{obj.send(field)} name='#{obj.name}'" | |
| (obj.content || '').scan(SNIPPET_REGEX) do |m| |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Ancestors</key> | |
| <array> | |
| <string>com.apple.dt.unit.cocoaTouchApplication</string> | |
| </array> | |
| <key>Concrete</key> | |
| <true/> |
I hereby claim:
To claim this, I am signing this object:
| $.getJSON( "https://devimages-cdn.apple.com/wwdc-services/h8a19f8f/049CCC2F-0D8A-4F7D-BAB9-2D8F5BAA7030/contents.json", function( data ) { | |
| var items = []; | |
| $.each( data.contents, function( key, val ) { | |
| if (val.type == 'Session' && val.eventId == 'wwdc2017' && val.related && val.related.resources) { | |
| $.each(val.related.resources, function (resKey, resId) { | |
| var resource = data.resources[resId] | |
| if (resource && resource['resource_type'] == 'samplecode') { | |
| items.push(resource); |
| import UIKit | |
| import JavaScriptCore | |
| /// An analyzer of sentiments | |
| class SentimentAnalyzer: NSObject { | |
| /// Singleton instance. Much more resource-friendly than creating multiple new instances. | |
| static let shared = SentimentAnalyzer() | |
| private let vm = JSVirtualMachine() | |
| private let context: JSContext | |
| import UIKit | |
| class ViewController: UIViewController { | |
| @IBOutlet weak var textField: UITextField! | |
| @IBOutlet weak var sentimentLabel: UILabel! | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| self.sentimentLabel.text = SentimentAnalyzer.shared.emoji(forScore: 0) | |
| } |
| const Sentiment = require('sentiment') | |
| export class Analyzer { | |
| static analyze(phrase) { | |
| let sentiment = new Sentiment() | |
| let result = sentiment.analyze(phrase) | |
| return result['score'] | |
| } | |
| } |
| var path = require('path') | |
| module.exports = { | |
| mode: "production", | |
| entry: { Sentimentalist: "./index.js" }, | |
| output: { | |
| path: path.resolve(__dirname, "dist"), | |
| filename: "[name].bundle.js", | |
| library: "[name]", | |
| libraryTarget: "var" |
| let jsCode = try? String.init(contentsOf: Bundle.main.url(forResource: "Sentimentalist.bundle", withExtension: "js")!) |