View test-smtp.js
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'; | |
// Before running, you need to yarn add yargs nodemailer | |
// And also replace this with your email: | |
const DEFAULT_TO_EMAIL = ''; | |
// Username password correct? Make sure your smtp provider doesn't | |
// have a from/to email address whitelist, or if it does, both emails | |
// are on it. |
View mp-util-classes.css
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
.ma-0, | |
.my-0, | |
.mt-0 { | |
margin-top: 0; | |
} | |
.ma-q, | |
.my-q, | |
.mt-q { | |
margin-top: .25rem; |
View mithril-table-example.html
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
<body> | |
<script> | |
// our data returned from server | |
var myMockEventObject = { | |
id: 'trkevt_1', | |
created: '', | |
updataed: '', | |
}; | |
// pretend data returned from server |
View index.js
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.exports.handle = function(event, context, callback) { | |
callback(null, 'hello world!'); | |
}; |
View blah.js
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
let nodeDeps = {}; | |
let nodeCache = {}; | |
// some dependency | |
Object.defineProperty(nodeDeps, 'some_module', { | |
get: () => { | |
if (process.argv[2] !== 'hello') throw new Error('hello must be first argument'); | |
const nodeModule = nodeCache.some_module || { world: () => console.log('world') }; | |
return nodeModule; | |
} |
View list-of-example-arns.js
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
// all the example arns from this page: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html | |
var arns = [ | |
'arn:aws:elasticbeanstalk:us-east-1:123456789012:environment/My App/MyEnvironment', | |
'arn:aws:iam::123456789012:user/David', | |
'arn:aws:rds:eu-west-1:123456789012:db:mysql-db', | |
'arn:aws:s3:::my_corporate_bucket/exampleobject.png', | |
'arn:aws:artifact:::report-package/Certifications and Attestations/SOC/*', | |
'arn:aws:artifact:::report-package/Certifications and Attestations/ISO/*', | |
'arn:aws:artifact:::report-package/Certifications and Attestations/PCI/*', | |
'arn:aws:autoscaling:us-east-1:123456789012:scalingPolicy:c7a27f55-d35e-4153-b044-8ca9155fc467:autoScalingGroupName/my-test-asg1:policyName/my-scaleout-policy', |
View build.js
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 path = require('path'); | |
const rollup = require('rollup'); | |
const babel = require('rollup-plugin-babel'); | |
const nodeResolve = require('rollup-plugin-node-resolve'); | |
const commonjs = require('rollup-plugin-commonjs'); | |
const builtins = require('rollup-plugin-node-builtins'); | |
const globals = require('rollup-plugin-node-globals'); |
View dynogels-credentials-loading-tests.js
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 assert = require('assert'); | |
var AWS = require('aws-sdk'); | |
var dynogels = require('dynogels'); | |
var Enjoi = require('enjoi'); | |
var config = { | |
endpoint: 'http://localhost:8000', | |
}; |
View mithril-delayed-route-set.js
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
if (ENV === 'development') { | |
var m_route_set = m.route.set; | |
var lastCall = new Date().getTime(); | |
var minDelayBetweenCalls = 100; | |
m.route.set = function() { | |
var args = arguments; | |
var now = new Date().getTime(); | |
var elapsed = now - lastCall; | |
lastCall = now; | |
setTimeout(function() { |
View mithril-v1-server-render.js
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 MockBrowser = require('mock-browser').mocks.MockBrowser; | |
var jsdom = require('jsdom'); | |
function propagateToGlobal (window) { | |
for (var key in window) { | |
if (!window.hasOwnProperty(key)) continue | |
if (global[key]) { |
NewerOlder