This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#who is in love? | |
architect.traverse.both(:friends, :has_coded, :loves).depth(:all).filter do | |
outgoing(:loves).to_a.size > 0 | |
end.each do |n| | |
puts n.name | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$LOAD_PATH << './lib' | |
require "lib/neo4j" | |
require "rubygems" | |
require "ruby-debug" | |
class Person | |
include Neo4j::NodeMixin | |
# define Neo4j properties | |
property :name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This code is property of Apple Inc. | |
* This code is intended for informational use only. | |
* Apple has granted no license for distribution or use. | |
**/ | |
var controller = {}; | |
controller.showInterface = function() { | |
if (1 == dataController.showVersionNumber) { | |
controller.setUpCacheLogging() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This code is property of Apple Inc. | |
* This code is intended for informational use only. | |
* Apple has granted no license for distribution or use. | |
**/ | |
const iPad = true; | |
const ADSupportsTouches = ("createTouch" in document); | |
const ADStartEvent = ADSupportsTouches ? "touchstart": "mousedown"; | |
const ADMoveEvent = ADSupportsTouches ? "touchmove": "mousemove"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This code is property of Apple Inc. | |
* This code is intended for informational use only. | |
* Apple has granted no license for distribution or use. | |
**/ | |
const iPad = true; | |
const ADSupportsTouches = ("createTouch" in document); | |
const ADStartEvent = ADSupportsTouches ? "touchstart": "mousedown"; | |
const ADMoveEvent = ADSupportsTouches ? "touchmove": "mousemove"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This code is property of Apple Inc. | |
* This code is intended for informational use only. | |
* Apple has granted no license for distribution or use. | |
**/ | |
var controller = {}; | |
controller.showInterface = function() { | |
if (1 == dataController.showVersionNumber) { | |
controller.setUpCacheLogging() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This code is property of Apple Inc. | |
* This code is intended for informational use only. | |
* Apple has granted no license for distribution or use. | |
**/ | |
const iPad = true; | |
const ADSupportsTouches = ("createTouch" in document); | |
const ADStartEvent = ADSupportsTouches ? "touchstart": "mousedown"; | |
const ADMoveEvent = ADSupportsTouches ? "touchmove": "mousemove"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This code is property of Apple Inc. | |
* This code is intended for informational use only. | |
* Apple has granted no license for distribution or use. | |
**/ | |
var controller = {}; | |
controller.showInterface = function() { | |
if (1 == dataController.showVersionNumber) { | |
controller.setUpCacheLogging() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DocUtils::Sanitizer | |
@sanitizer = HTML::WhiteListSanitizer.new | |
AllowedTags = { | |
:none => [], | |
:default => %w(u img a i b div br ul li), | |
:only_images => %w(img) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def osascript(script) | |
system 'osascript', *script.split(/\n/).map { |line| ['-e', line] }.flatten | |
end | |
osascript <<-END | |
tell application "Finder" | |
display dialog "Hello" | |
end tell | |
END |