ON APP INIT
-
User has not login to Chrome: no server communication needed. only store data to local storage.
-
When user login to Chrome (profile_id is defined)
- check if user is in the database
Tether is a great library for positioning stuff (tooltips, modals, hints, etc) in your web app.
But, as I use React, it was pretty problematic for me, as Tether mutates the DOM and React breaks miserably when it sees mutated DOM. The solution is to have the tethered element outside the part of the DOM tree which is controlled by React (in this case, I use document.body
).
That's why I created 2 helpers to use Tether with React.
The first one, TetheredElement
is a plain JS helper to create a new element, attach it to some other one via Tether, and populate it with some React component.
The second one, TetherTarget
is a React component and it uses TetheredElement
to integrate it further with React, so that you can attach components to each other with Tether, without leaving the cozy React/JSX world and worrying about manual DOM operations. Just write:
#! /usr/bin/node | |
var MongoClient = require('mongodb').MongoClient | |
var Server = require('mongodb').Server; | |
var async = require('async'); | |
var util = require('util'); | |
// A simple linear congruence random number generator. | |
// This is anticipating doing a comparable test with the aggregation pipeline. | |
var randMod = 2 << 24; |
angular.module('myApp', ['ngRoute']) | |
.provider('Weather', function() { | |
var apiKey = ""; | |
this.getUrl = function(type, ext) { | |
return "http://api.wunderground.com/api/" + | |
this.apiKey + "/" + type + "/q/" + | |
ext + '.json'; | |
}; |
This presenation is an exploration of rolling your own data persistence for and Ember.js Application
During this discovery I attempt to roll my own data solution. I've selected to use alpha software, Orbit.js. So not also choosing other alpha software at the some time. Not covering es6, broccoli, ember-cli etc.
The exploratory app is based on converting my blog app (uses REST) to use Web sockets with a Node.js backend. I am using some build tools brunch.io also borrowing from tapas-with-ember. The modules in the source code are [CommonJS modules].
#https://gorails.com/setup/ubuntu/14.04 | |
sudo apt-get update | |
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties | |
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev | |
curl -L https://get.rvm.io | bash -s stable | |
source ~/.rvm/scripts/rvm | |
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc | |
rvm install 2.1.2 | |
rvm use 2.1.2 --default |
javascript: (function() { | |
var root = $(document.getElementsByTagName('html')); | |
var watchers = []; | |
var attributes = []; | |
var attributes_with_values = []; | |
var elements = []; | |
var elements_per_attr = []; | |
var scopes = []; |
export http_proxy= | |
export https_proxy= | |
curl -XDELETE 'http://localhost:9200/test/' | |
echo "Creating the mapping" | |
curl -XPUT 'http://localhost:9200/test/?pretty=1' -d ' | |
{ | |
"mappings" : { | |
"member" : { |
# | |
# my zsh theme with iTerm titlebar manip. | |
# see video to see the bug I have.. any help would be HUGELY appreciated :) | |
# http://youtu.be/U-h9XCCq0q4 | |
# | |
# also | |
# https://github.com/sjl/oh-my-zsh/ | |
# http://sage.ucsc.edu/xtal/iterm_tab_customization.html |