- Make sure it does something useful.
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
>>> import requests | |
>>> import random | |
>>> random.seed(<YOUR COMMIT HASH>) | |
>>> poke_id = random.choice(range(1,719)) | |
>>> data = requests.get('http://pokeapi.co/api/v1/pokemon/' + str(poke_id) + '/') | |
>>> data.json()['name'] |
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
<div data-ofs-component="responsive"> | |
<div class="full" data-media="(min-width: 769px)"> | |
<span data-ofs-component="picture" class="image image-panorama_a"> | |
<!-- normal picturefill markup --> | |
</span> | |
</div> | |
<div class="tablet" data-media="(min-width: 481px) and (max-width : 768px)"> | |
<span data-ofs-component="picture" class="image image-tablet_a"> | |
<!-- normal picturefill markup --> | |
</span> |
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
ENGLISH_PREPOSITIONS = ( | |
'aboard', | |
'about', | |
'above', | |
'across', | |
'after', | |
'against', | |
'along', | |
'amid', | |
'among', |
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 Datepicker = React.createClass({ | |
render: function() { | |
return this.transferPropsTo(<input />); | |
} | |
}); | |
$(document).ready(function() { | |
$('.datepicker').each(function(index, element) { | |
React.renderComponent( | |
<Datepicker />, |
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() { | |
var options = {}; | |
var EntryPoint = require('{{ JS_ENTRY_POINT }}'); | |
var entry = new EntryPoint(options); | |
$(function() { | |
entry.render(document); | |
}); | |
})(); |
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 webpack = require("webpack"); | |
var ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
module.exports = { | |
entry: { | |
library: './static/js/library' | |
}, | |
output: { | |
path: 'mediacat/static/mediacat/', |
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 Immutable = require('immutable'); | |
var data = Immutable.fromJS({ a: { b: { c: 1 } } }); | |
data.toJS(); | |
// { a: { b: { c: 1 } } } | |
var cursor = data.cursor(['a'], function(newData) { data = newData; }); | |
cursor.set('d', 2); |
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 Mousetrap = require('mousetrap'); | |
var Immutable = require('immutable'); | |
class Keyboard { | |
constructor() { | |
this.keyStack = Immutable.fromJS([[]]); | |
} | |
push() { | |
this.keyStack = this.keyStack.push(Immutable.fromJS([])); |
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 React = require('react'); | |
var KeyboardMixin = { | |
propTypes: { | |
keyboard: React.PropTypes.object | |
}, | |
contextTypes: { | |
keyboard: React.PropTypes.object | |
}, |