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
MySimpleComponent = React.createClass | |
render: -> <pre>{@props.mytext}</pre> | |
MyComponent = React.createClass | |
render: -> | |
<ul> | |
@props.items.map (item) => | |
<li><a href="#" onClick={@props.handleClick}>{item}</a></li> | |
</ul> |
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 Style = require('react-free-style').create() | |
var BUTTON_STYLE = Style.registerStyle({ | |
backgroundColor: 'red', | |
padding: 10 | |
}) | |
var ButtonComponent = Style.component(React.createClass({ | |
// You must define `contextTypes` to access `freeStyle`. |
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
const styles = StyleSheet.create({ | |
list: { /* etc */ }, | |
hover: { /* etc */ }, | |
}); | |
export default class List extends React.Component { | |
static propTypes = { | |
style: React.PropTypes.style, | |
hoverStyle: React.PropTypes.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
The DomainObjectCollection.allObjects() method is deprecated and will be removed in the next version of Gradle. You should use the all() method instead. | |
FAILURE: Build failed with an exception. | |
* Where: | |
Build file '/tmp/groovy-wslite/build.gradle' line: 46 | |
* What went wrong: | |
A problem occurred evaluating root project 'groovy-wslite'. | |
Cause: Could not find property 'pgpSecretKeyRingFile' on root project 'groovy-wslite'. |
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
# Maintainer: Leif Warner <abimelech@gmail.com> | |
pkgname=vim-coffeescript-git | |
pkgver=20110823 | |
pkgrel=1 | |
pkgdesc="CoffeeScript syntax support for Vim." | |
arch=('any') | |
url="http://github.com/kchmck/vim-coffee-script" | |
license=('WTFPL') | |
depends=('vim') | |
makedepends=('git') |
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
package computer; | |
import java.io.*; | |
// Referenced classes of package computer: | |
// VirtualMonitor, VirtualKeyboard, AWTKeyMapping | |
public class DCPU { | |
public DCPU() { |
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 gistPrefix = 'http://gist.github.com/', | |
// Cache document.write so that it can be restored once all Gists have been | |
// embedded. | |
cachedWrite = document.write, | |
body = $('body'), | |
// Map each p.gist to an object that contains the paragraph to be replaced | |
// and the Gist's identifier. | |
gists = $('p.gist').map(function(n, p) { | |
p = $(p); |
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
split_to_lines = (str, max_width) -> | |
lines = [] | |
words = str.split(' ') | |
current_line = '' | |
for word in words | |
if current_line.length + word.length > max_width | |
lines.push current_line | |
current_line = word + ' ' | |
else | |
current_line += word + ' ' |
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 gistPrefix = 'https://gist.github.com/', | |
// Cache document.write so that it can be restored once all Gists have been | |
// embedded. | |
cachedWrite = document.write, | |
body = $('body'), | |
// Map each p.gist to an object that contains the paragraph to be replaced | |
// and the Gist's identifier. | |
gists = $('a.gist').map(function(n, a) { | |
a = $(a); | |
var href = a.attr('href'); |
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
function split_to_lines(str, max_width) { | |
var current_line, lines, word, words, _i, _len; | |
lines = []; | |
words = str.split(' '); | |
current_line = ''; | |
for (_i = 0, _len = words.length; _i < _len; _i++) { | |
word = words[_i]; | |
if (current_line.length + word.length > max_width) { | |
lines.push(current_line); | |
current_line = word + ' '; |
OlderNewer