- Install and configure Postgres [https://library.linode.com/databases/postgresql/ubuntu-12.04-precise-pangolin]
- Download latest stable version of plv8 [https://code.google.com/p/plv8js/wiki/PLV8]
- Extract plv8.zip and cd into it.
- sudo apt-get install subversion
- sudo make static
- Copy plv8.so to /usr/lib/postgres/9.1/lib
- Copy plv8--(version).sql and plv8.control to /usr/share/postgres/9.1/extension
- psql -d dbName
- CREATE EXTENSION plv8;
- Repeat 6-8 for plls (livescript) and plcoffee (coffeescript) if required
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
/* =========================================================== | |
* bootstrap-tooltip.js v2.1.1 | |
* http://twitter.github.com/bootstrap/javascript.html#tooltips | |
* Inspired by the original jQuery.tipsy by Jason Frame | |
* =========================================================== | |
* Copyright 2012 Twitter, Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at |
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() { | |
function checkColorSupport() { | |
if (typeof window === 'undefined' || typeof navigator === 'undefined') { | |
return false; | |
} | |
var chrome = !!window.chrome, | |
firefox = /firefox/i.test(navigator.userAgent), | |
firefoxVersion; | |
if (firefox) { |
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
/** | |
* Todo Root Container Component | |
*/ | |
import React, { Component } from 'react'; | |
import TodoItem from './TodoItem'; | |
import TodoInput from './TodoInput'; | |
class Todo extends Component { | |
constructor(props) { |
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
/** | |
* TodoInput Component | |
*/ | |
import React, { Component } from 'react'; | |
class TodoInput extends Component { | |
constructor(props) { | |
super(props); |
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
/** | |
* TodoItem Component | |
*/ | |
import React, { Component } from 'react'; | |
class TodoItem extends Component { | |
constructor(props) { | |
super(props); |
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 [value, setValue] = useState(initialValue); |
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
/** | |
* TodoInput Component | |
*/ | |
import React, { useState } from 'react'; | |
function TodoInput({ | |
onAdd | |
}) { | |
const [text, setText] = useState(''); |
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 memoizedFunction = useCallback(inlineFunctionDefinition, memoizationArguments); |
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
/** | |
* TodoInput Component | |
*/ | |
import React, { useState, useCallback } from 'react'; | |
function TodoInput({ | |
onAdd | |
}) { | |
const [text, setText] = useState(''); |
OlderNewer