(wherever it says url.com, use your server's domain or IP)
Login to new server as root, then add a deploy user
sudo useradd --create-home -s /bin/bash deploy
sudo adduser deploy sudo
sudo passwd deployAnd Update the new password
| (function($) { | |
| function parseImagesFromCSS(doc) { | |
| var i, j, | |
| rule, | |
| image, | |
| pattern = /url\((.*)\)/, | |
| properties = ['background-image', '-webkit-border-image'], | |
| images = {}; | |
| if (doc.styleSheets) { |
| var express = require('express'), | |
| requirejs = require('requirejs'), | |
| app = module.exports = express.createServer(); | |
| app.configure('development', function(){ | |
| // Use development version of static files | |
| app.use(express.static(__dirname + '/public')); | |
| }); | |
| app.configure('production', function(){ |
| import React from "react"; | |
| import {ContextTypes, DefaultProps, PropTypes} from "./Decorators"; | |
| // this will throw a warning. | |
| @PropTypes({name: React.PropTypes.func}) | |
| @DefaultProps({name: "robbie"}) | |
| class BaseClass extends React.Component { | |
| render() { | |
| return ( | |
| <div className="base-class-example"> |
| import React, { Component } from 'react'; | |
| import storeDecorator from './store-decorator'; | |
| import someStore, { SOME_STORE_SYMBOL } from './some-reflux-store'; | |
| @storeDecorator(someStore) | |
| class SomeComponent extends Component { | |
| render() { | |
| return ( | |
| <div> | |
| {this.state[SOME_STORE_SYMBOL].someProperty} |
| import React from 'react'; | |
| import SomeStore from '../stores/SomeStore'; | |
| import AppActions from '../actions/AppActions'; | |
| function gatherSomeStoreState(props, state) { | |
| return { | |
| myRandomNumber: SomeStore.getRandomNumber() | |
| }; | |
| } |
(wherever it says url.com, use your server's domain or IP)
Login to new server as root, then add a deploy user
sudo useradd --create-home -s /bin/bash deploy
sudo adduser deploy sudo
sudo passwd deployAnd Update the new password
| #!/bin/bash | |
| # from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/ | |
| # and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server | |
| ############################################### | |
| # To use: | |
| # wget https://raw.github.com/gist/2776679/04ca3bbb9f085b192f6aca945120fe12d59f15f9/install-redis.sh | |
| # chmod 777 install-redis.sh | |
| # ./install-redis.sh | |
| ############################################### | |
| echo "*****************************************" |
You can use this class to realize a simple sectioned RecyclerView.Adapter without changing your code.
The RecyclerView should use a LinearLayoutManager.
You can use this code also with the TwoWayView with the ListLayoutManager (https://github.com/lucasr/twoway-view)
This is a porting of the class SimpleSectionedListAdapter provided by Google
Example:
| # Elasticsearch Cheatsheet - an overview of commonly used Elasticsearch API commands | |
| # cat paths | |
| /_cat/allocation | |
| /_cat/shards | |
| /_cat/shards/{index} | |
| /_cat/master | |
| /_cat/nodes | |
| /_cat/indices | |
| /_cat/indices/{index} |