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
<link rel="import" href="../components/polymer/polymer.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
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
#!/bin/bash -x | |
welcome() { | |
echo " _ _____________ ___ _____ _____ " | |
echo "| | | | ___ \ _ \/ _ \_ _| ___|" | |
echo "| | | | |_/ / | | / /_\ \| | | |__ " | |
echo "| | | | __/| | | | _ || | | __| " | |
echo "| |_| | | | |/ /| | | || | | |___ " | |
echo " \___/\_| |___/ \_| |_/\_/ \____/" | |
echo |
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
'use strict' | |
gulp = require 'gulp' | |
gutil = require 'gulp-util' | |
browserify = require 'browserify' | |
header = require 'gulp-header' | |
uglify = require 'gulp-uglify' | |
pkg = require './package.json' | |
source = require 'vinyl-source-stream' |
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
/** | |
* Module dependencies | |
*/ | |
'use strict'; | |
var buildDictionary = require('sails-build-dictionary'); | |
module.exports = function Responses(sails) { | |
return { | |
loadResponses: function(cb) { |
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
'use strict'; | |
var path = require('path'); | |
var workerFarm = require('worker-farm'); | |
var numCPUs = require('os').cpus().length; | |
var argv = require('optimist') | |
.alias('n', 'cores') | |
.default('n', numCPUs) | |
.alias('w', 'workers') |
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
var count = 0 | |
function asyncFn (cb) { | |
setTimeout(function () { | |
console.log('emit new chunk') | |
return cb(null, {foo: 'bar'}) | |
}, 500) | |
} | |
module.exports = function () { |
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
// Example based in Substack Stream Handbook: | |
// https://github.com/substack/stream-handbook#creating-a-readable-stream | |
'use strict' | |
var inherits = require('inherits') | |
var duplexify = require('duplexify') | |
var Stream = require('readable-stream').Stream | |
var CONST = { |
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
{ | |
"app": "YOUR_APP_NAME", | |
"cred": { | |
"appid": "YOUR_APP_ID", | |
"apikey": "YOUR_APP_KEY" | |
}, | |
"oldentries": 86400000, | |
"index": { | |
"name": "YOUR_INDEX_NAME", | |
"settings": { |
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
'use strict' | |
const HtmlWebpackHarddiskPlugin = require('html-webpack-harddisk-plugin') | |
const PurifyCSSWebpackPlugin = require('purifycss-webpack-plugin') | |
const {BundleAnalyzerPlugin} = require('webpack-bundle-analyzer') | |
const ExtractTextPlugin = require('extract-text-webpack-plugin') | |
const PreloadWebpackPlugin = require('preload-webpack-plugin') | |
const HtmlWebpackPlugin = require('html-webpack-plugin') | |
const OfflinePlugin = require('offline-plugin') | |
const webpack = require('webpack') |
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
#!/bin/bash | |
NODE_BIN=`curl -sL https://semver.io/node/resolve/8`-linux-x64 | |
echo "Downloading $NODE_BIN binary file" | |
curl -sL https://nodejs.org/dist/latest-v8.x/node-v$NODE_BIN.tar.gz | tar -xz | |
mkdir -p bin | |
mv node-v$NODE_BIN/bin/node bin/node | |
rm -rf node-v$NODE_BIN |
OlderNewer