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
export default function productList(products) { | |
const element = document.getElementById('product-list'); | |
// map of products | |
let productItem = products.map(product => ` | |
<div class="product-item"> | |
<h1 class="product-title">${product.productVariants[0].title}</h1> | |
<img class="product-image" src="${product.productVariants[0].imageUrl}" alt="${product.productVariants[0].title}"> | |
<p class="product-price">${product.productVariants[0].price}</p> |
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
import { NgModule } from '@angular/core'; | |
import { | |
MatButtonModule, | |
MatSnackBarModule, | |
MatCardModule, | |
MatInputModule, | |
MatCheckboxModule, | |
MatIconModule, | |
MatSidenavModule, | |
MatSelectModule, |
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
Verifying that "candidosales.id" is my Blockstack ID. https://onename.com/candidosales |
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
user nginx; | |
# PERFORMANCE | |
# https://gist.github.com/denji/8359866 | |
# you must set worker processes based on your CPU cores, nginx does not benefit from setting more than that | |
worker_processes auto; #some last versions calculate it automatically | |
# number of file descriptors used for nginx | |
# the limit for the maximum FDs on the server is usually set by the OS. | |
# if you don't set FD's then OS settings will be used which is by default 2000 | |
worker_rlimit_nofile 100000; |
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
namespace :update_products do | |
desc "update_products" | |
task :description => :environment do | |
skus = ["ABR112803","ABR112903","ABR112703","ABR101703","ABR101903","ABR102303","ABR109203","ABR113403","ABR112806","ABR100803","ABR10103","ABR112906","ABR113003","ABR113103","ABR100903","ABR101303","ABR101403","ABR101503","ABR102103","ABR109003","ABR112503","ABR113203","ABR89603","ABR84703","ABR102506","ABR112706","ABR101706","ABR101906","ABR102306","ABR109206","ABR113406","ABR112812","ABR100806","ABR112912","ABR113006","ABR113106","ABR100906","ABR101006","ABR101306","ABR101406","ABR101506","ABR102106","ABR10906","ABR112506","ABR113206","ABR89606","ABR84706","ABR89303","ABR102512","ABR10003","ABR112712","ABR101912","ABR102312","ABR105503","ABR109212","ABR113412","ABR100812","ABR113012","ABR113112","ABR101012","ABR101312","ABR101512","ABR102112","ABR109012","ABR112512","ABR113212","ABR101712","ABR88303","ABR100912","ABR89612","ABR101412","ABR84712","ABR89306","ABR100006","ABR105506","ABR88306","ABR89312","ABR1000 |
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
define(['text!./template.html'], function(tpl) { | |
var template = _.template(tpl); | |
return { | |
initialize: function() { | |
this.render(); | |
this.attachEvents(); | |
this.sandbox.on('product.start', this.render, this); | |
this.sandbox.on('product.changePrice',this.changePrice, this); | |
this.sandbox.on('product.calculate',this.calculate, this); |
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
<div class="product"> | |
<div class="small-1 columns"> | |
<a href="#" class="button minus" title="Remover"> | |
<span class="icon-minus"></span> | |
</a> | |
</div> | |
<div class="small-10 columns"> | |
<div class="small-6 columns"> | |
<dl class="tabs" data-tab> | |
<dd class="active"><a href="#panel2-1">GLP</a></dd> |
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
/*global module:false*/ | |
module.exports = function(grunt) { | |
// load all grunt tasks | |
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); | |
// Project configuration. | |
grunt.initConfig({ | |
// Metadata. | |
pkg: grunt.file.readJSON('package.json'), |
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 isPrime(n) { | |
if (n%1 || n<2) return false; | |
if (n%2==0) return (n==2); | |
var m=Math.sqrt(n); | |
for (var i=3;i<=m;i+=2) { | |
if (n%i==0) return false; | |
} | |
return true; | |
} |
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
/*global module:false*/ | |
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
// Metadata. | |
pkg: grunt.file.readJSON('package.json'), | |
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' + | |
'<%= grunt.template.today("yyyy-mm-dd") %>\n' + | |
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' + |