View .js
function cache(req, res, next) {
const param = req.query.param;
client.get(param, function (err, data) {
if (err) throw err;
if (data != null) {
res.send(respond(org, data));
} else {
next();
}
View install.sh
#!/usr/bin/env bash
# Python Project Bootstrapped Installer by Alex Goretoy <alex@goretoy.com>
# only change packages in the install_project_packages function and the install_test_packages function
# run the script as part of development process to keep project deps and requirement files all in sync
function install_project_packages() {
# dependencies
pip install names;
View add.sh
#!/usr/bin/env bash
DATE=${1:-"2018-03"};
DICT_DIR="./dictionary-data/$DATE/";
THES_DIR="./thesaurus-data/$DATE/";
#if [ -d "$DICT_DIR" ]; then
# cd "$DICT_DIR";
for i in a b c d e f g h i j k l m n o p q r s t u v w x y z 0; do
git add "$i.json";
View index.html
<!DOCTYPE html>
<html>
<head>
<script data-require="vue.js@*" data-semver="10.0.26" src="https://cdn.jsdelivr.net/vue/2.0.2/vue.min.js"></script>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div id="card">
View index.html
<!DOCTYPE html>
<html>
<head>
<script data-require="vue.js@*" data-semver="10.0.26" src="https://cdn.jsdelivr.net/vue/1.0.26/vue.min.js"></script>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div id="card">
View index.html
<!DOCTYPE html>
<html>
<head>
<script data-require="vue.js@*" data-semver="10.0.26" src="https://cdn.jsdelivr.net/vue/2.0.2/vue.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.16.6/lodash.min.js"></script>
<link rel="stylesheet" href="style.css" />
</head>
<body>
View index.js
/*
* Open the console
* to see the state log.
*/
const todo = (state, action) => {
switch (action.type) {
case 'ADD_TODO':
return {
id: action.id,
View index.js
const counter = (state = 0, action) => {
switch (action.type) {
case 'INCREMENT':
return state + 1;
case 'DECREMENT':
return state - 1;
default:
return state;
}
}
View index.js
const counter = (state = 0, action) => {
switch (action.type) {
case 'INCREMENT':
return state + 1;
case 'DECREMENT':
return state - 1;
default:
return state;
}
}
View 1-Model Definition Basics.js
var Sequelize = require('sequelize')
var db = new Sequelize('mydb', null, null, {
dialect: 'postgres'
})
var Post = db.define('post', {
id: {
type: Sequelize.INTEGER,
primaryKey: true,
autoIncrement: true