This file contains 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
from imagination.tulip import subprocess | |
p = subprocess.run("somecmd", ["arg1", "arg2"]) | |
# process's pid | |
p.pid | |
# send signal to process | |
p.kill(subprocess.SIGINT) |
This file contains 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
var Page = ReactApp.createPage(function(props) { | |
return <html><body>Hello, world</body></html>; | |
}); |
This file contains 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
macro attributes { | |
case {_()} => { | |
return #{null} | |
} | |
case {_($($name:ident = $val:expr) (,) ...)} => { | |
return [makeDelim('{}', #{$($name: $val) (,) ...})] | |
} | |
} | |
macro component { |
This file contains 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
var Page = React.createClass({ | |
render: function() { | |
return markup html { | |
head { | |
meta(charset="utf8") | |
title { "Page" } | |
} | |
body { | |
div(className="wrapper") | |
} |
This file contains 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
var Tappable = React.createClass({ | |
render: function() { | |
return <div onClick={this.onClick} onTouchTapEnd={this.onClick}>{this.props.children}</div>; | |
} | |
}); | |
... | |
<Tappable onClick={this.handle}>Some stuff</Tappable> |
This file contains 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
<!doctype html> | |
<input id="query" type="text"></input> | |
<button id="search">Search</button> | |
<p id="results"></p> | |
<script src="bundle.js"></script> |
This file contains 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
/** | |
* Copyright 2013 Facebook, Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains 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
<!doctype> | |
<html> | |
<head> | |
<title>Component Example</title> | |
<link rel="stylesheet" href="bundle.css"> | |
<style> | |
body { | |
padding: 10px; | |
} | |
</style> |
This file contains 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
<!doctype> | |
<html> | |
<head> | |
<title>Component Example</title> | |
<link rel="stylesheet" href="bundle.css"> | |
<style> | |
body { | |
padding: 10px; | |
} | |
</style> |
This file contains 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
<!doctype> | |
<html> | |
<head> | |
<title>Component Example</title> | |
<link rel="stylesheet" href="bundle.css"> | |
<style> | |
body { | |
padding: 10px; | |
} | |
</style> |