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> | |
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en" > <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Zurb foundation4 flask template</title> | |
<link rel="stylesheet" href="{{ url_for('static', filename='css/foundation.css') }}"> | |
<link rel="stylesheet" href="{{ url_for('static', filename='css/custom.css') }}"> <!-- my custom css file --> |
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
/// include required lib | |
var readline = require('readline'); | |
/// Generate computer answer | |
var ComputerAns = function(){ | |
var num = Math.random(); | |
//console.log(num); | |
if (num < 0.34) return 'rock'; | |
if (num >= 0.34 && num < 0.67) return 'paper'; |
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
'use strict'; | |
var o = { | |
m: function(){ | |
var self = this; //save this value in a variable | |
console.log(this === o); //true | |
f(); | |
function f(){ | |
console.log(this === o); //false |
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 getIndexNames(o, a){ | |
var a = a || []; //if (a === undefined) a = []; | |
for(var index in o){ | |
console.log("---"+ o[index]); | |
a.push(index); | |
}; | |
return a; | |
} |
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
http_path = "/" | |
css_dir = "." | |
sass_dir = "." | |
images_dir = "img" | |
javascripts_dir = "js" | |
output_style = :compressed | |
relative_assets=true | |
line_comments = false |
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
... | |
compass_config do |config| | |
config.output_style = :compressed | |
config.add_import_path "../bower_components/foundation/scss" | |
config.http_path = "/" | |
config.css_dir = "stylesheets" | |
config.sass_dir = "stylesheets" | |
config.images_dir = "images" | |
config.javascripts_dir = "javascripts" | |
config.relative_assets = true |
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
/** @jsx React.DOM */ | |
var React = require('react'); | |
var TodoList = React.createClass({ | |
getInitialState: function(){ | |
console.log('getInitialState'); | |
return null; | |
}, | |
componentWillMount: function(){ |
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
/** @jsx React.DOM */ | |
var React = require('react'), | |
TodoList = require('./todo-list'); | |
var TodoApp = React.createClass({ | |
getInitialState: function(){ | |
console.log('TodoApp -- getInitialState'); | |
return { | |
items: [], | |
text: '' |
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
{ | |
"name": "webpack-react-livereload", | |
"devDependencies": { | |
"jsx-loader": "^0.12.2", | |
"react-hot-loader": "^1.1.4", | |
"webpack": "^1.5.3", | |
"webpack-dev-server": "^1.7.0" | |
} | |
} |
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 FluxibleMixin = require('fluxible').Mixin; | |
var ApplicationStore = require('../stores/ApplicationStore'); | |
var Home = require('./Home.jsx'); | |
var About = require('./About.jsx'); | |
var Application = React.createClass({ | |
mixins: [FluxibleMixin], | |
getInitialState: function(){ | |
return this.getStore(ApplicationStore).getState(); |
OlderNewer