This file contains hidden or 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
//////////////////////////////////////////////////////////////////////////////// | |
// /Users/lupo/Documents/workspace/wrangr/hoodie-server/node_modules/hoodie/dist/hoodie.js | |
//////////////////////////////////////////////////////////////////////////////// | |
// Hoodie.js - 0.6.3 | |
// https://github.com/hoodiehq/hoodie.js | |
// Copyright 2012 - 2014 https://github.com/hoodiehq/ | |
// Licensed Apache License 2.0 | |
!function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.Hoodie=e():"undefined"!=typeof global?global.Hoodie=e():"undefined"!=typeof self&&(self.Hoodie=e())}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof requi |
This file contains hidden or 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
require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | |
Hoodie.extend(function(hoodie) { | |
hoodie.email = { | |
send: hoodie.task('email').start | |
} | |
}); | |
},{}],2:[function(require,module,exports){ | |
// TODO: This is not being included at all at moment as we are not loading | |
// hoodie.js using `/_api/_files/hoodie.js` because that seems to throw an error |
This file contains hidden or 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
<html> | |
<head> | |
<title>Test</title> | |
<script type="text/javascript"> | |
'use strict'; | |
(function () { | |
console.log('Got here.'); | |
}()); | |
</script> |
This file contains hidden or 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 psl = require('psl'); | |
var parsed = psl.parse('a.b.c.d.foo.uk.com'); | |
console.log(parsed.tld); // 'uk.com' | |
console.log(parsed.sld); // 'foo' | |
console.log(parsed.domain); // 'foo.uk.com' | |
console.log(parsed.subdomain); // 'a.b.c.d' |
This file contains hidden or 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 psl = require('psl'); | |
var parsed = psl.parse('a.b.ide.kyoto.jp'); | |
console.log(parsed.tld); // 'ide.kyoto.jp' | |
console.log(parsed.sld); // 'b' | |
console.log(parsed.domain); // 'b.ide.kyoto.jp' | |
console.log(parsed.subdomain); // 'a' | |
var parsed2 = psl.parse('www.sony.jp'); |
This file contains hidden or 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 psl = require('psl'); | |
var parsed = psl.parse('www.食狮.中国'); | |
console.log(parsed.tld); // '中国' | |
console.log(parsed.sld); // '食狮' | |
console.log(parsed.domain); // '食狮.中国' | |
console.log(parsed.subdomain); // 'www' | |
var parsed2 = psl.parse('shishi.中国'); |
This file contains hidden or 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 path = require('path'); | |
// `npm install --save hoodie-plugins-api` in your plugin dir | |
var PluginAPI = require('hoodie-plugins-api').PluginAPI; | |
// | |
// Poor man's hoodie API. | |
// | |
function getHoodie(settings) { | |
var hoodieAdmin = { | |
user: process.env.HOODIE_ADMIN_USER, |
This file contains hidden or 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
PREFIX=/opt/local | |
SRC=$PREFIX/src/phantomjs | |
DOWNLOAD_FILE=phantomjs-1.9.8-smartos-i386.tgz | |
DOWNLOAD_URL=https://us-east.manta.joyent.com/pkgsrc/public/packages/SmartOS/phantomjs/$DOWNLOAD_FILE | |
# Create directory where we are going to put phantomjs' source files | |
mkdir -p $SRC | |
# Go into dir, download and extract archive | |
cd $SRC | |
wget $DOWNLOAD_URL |
This file contains hidden or 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
# Enable GZIP | |
<ifmodule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript | |
</ifmodule> | |
# END GZIP | |
<IfModule mod_filter.c> | |
AddOutputFilterByType DEFLATE "application/atom+xml" \ | |
"application/javascript" \ | |
"application/json" \ |
This file contains hidden or 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 intersection(a, b) { | |
return a.filter(value => b.indexOf(value) > -1).sort(); | |
} |