##Recommendation Engine Services
####IREUS Recommendation Engine for stores as SaaS
####Plista
| <?php | |
| class comment_walker extends Walker_Comment { | |
| var $tree_type = 'comment'; | |
| var $db_fields = array( 'parent' => 'comment_parent', 'id' => 'comment_ID' ); | |
| // constructor – wrapper for the comments list | |
| function __construct() { ?> | |
| <section class="comments-list"> |
##Recommendation Engine Services
####IREUS Recommendation Engine for stores as SaaS
####Plista
| /** | |
| * @file A WordPress-like hook system for JavaScript. | |
| * | |
| * This file demonstrates a simple hook system for JavaScript based on the hook | |
| * system in WordPress. The purpose of this is to make your code extensible and | |
| * allowing other developers to hook into your code with their own callbacks. | |
| * | |
| * There are other ways to do this, but this will feel right at home for | |
| * WordPress developers. | |
| * |
| var all = []; | |
| jQuery('#icons section').each(function(index, section) { | |
| var id = jQuery(this).attr('id'); | |
| jQuery('#'+ id + ' a').each(function(index, iconrow) { | |
| all.push({ | |
| name: jQuery(this).text().replace('Example of','').replace(/^\s+/g, ""), | |
| className: jQuery(this).children('i').attr('class') | |
| }); | |
| }); | |
| }); |
| #!/bin/bash | |
| set -eu | |
| main() { | |
| local args=("$@") | |
| local inFile=$(pwd)/docker-compose.yml | |
| local outFile=$(pwd)/$1 | |
| if [[ $# -lt 2 ]]; then | |
| usage |
| # Node.js app Docker file | |
| FROM ubuntu:14.04 | |
| MAINTAINER Thom Nichols "[email protected]" | |
| ENV DEBIAN_FRONTEND noninteractive | |
| RUN apt-get update | |
| RUN apt-get -qq update | |
| RUN apt-get install -y nodejs npm |
These are my notes basically. At first i created this gist just as a reminder for myself. But feel free to use this for your project as a starting point. If you have questions you can find me on twitter @thomasf https://twitter.com/thomasf This is how i used it on a Debian Wheezy testing (https://www.debian.org/releases/testing/)
Discuss, ask questions, etc. here https://news.ycombinator.com/item?id=7445545
| # Set variables in .bashrc file | |
| # don't forget to change your path correctly! | |
| export GOPATH=$HOME/golang | |
| export GOROOT=/usr/local/opt/go/libexec | |
| export PATH=$PATH:$GOPATH/bin | |
| export PATH=$PATH:$GOROOT/bin |
| var connectionString = 'postgres://localhost:5432/postgres'; | |
| var Promise=require('bluebird'); | |
| var knex = require('knex')({ | |
| client: 'pg', | |
| connection: { | |
| user: 'postgres', | |
| database: 'postgres', | |
| port: 5432, |
| <IfModule mod_headers.c> | |
| Header set Connection keep-alive | |
| # Cache-control headers | |
| # 2 HOURS | |
| #<filesMatch "*"> | |
| Header set Cache-Control "max-age=7200, must-revalidate" | |
| #</filesMatch> | |
| # 480 weeks - 290304000 |