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
sitapati@MacBook-Air [~/workspace/BGL-JAWS/jaws-bgl/aws_modules] $ jaws help create lambda | |
jaws create lambda | |
Options: | |
--endpoint, -e [string] Create an API Gateway endpoint for this AWSM Lambda | |
--name [string] Name for the newly created resource | |
--package-manager, -p [string] Specify a package manager to scaffold for publishing this AWSM Lambda | |
--runtime, -R [string] Runtime for this AWSM Lambda. Defaults to nodejs | |
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
/** | |
* AWS Module: Action: Modularized Code with Promise for Asynchronous functions | |
*/ | |
var Promise = require('bluebird'); | |
// Export For Lambda Handler | |
module.exports.run = function(event, context, cb) { | |
return action(event).then(function(result) { | |
cb(null, result); |
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
/** | |
* AWS Module: Action: Modularized Code with Promise for Asynchronous functions | |
*/ | |
var Promise = require('bluebird'); | |
// Export For Lambda Handler | |
module.exports.run = function(event, context, cb) { |
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
'use strict'; | |
/** | |
* AWS Module: Action: Lambda Handler | |
* "Your lambda functions should be a thin wrapper around your own separate | |
* modules, to keep your code testable, reusable and AWS independent" | |
*/ | |
require('jaws-core-js/env'); |
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
worlds: | |
kigam: | |
==: MVWorld | |
hidden: 'false' | |
alias: '' | |
color: WHITE | |
style: NORMAL | |
pvp: 'true' | |
scale: '1.0' | |
respawnWorld: '' |
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
#!/usr/bin/env jjs | |
/*#################################################################################################################################### | |
# As Nashorn does not have http capabilities through XMLHttpRequest (DOM API), we have to use regular Java classes instead. | |
# This sample shows how this can be acheived without depending on any third party libraries. Just a standard Java 8 JDK. | |
# Make sure to have JAVA_HOME/bin on your PATH for the shebang to work. Then just chmod +x away and run... | |
# Alternatively if you're on a non *nix OS, start with jjs -scritping httpsample.js | |
####################################################################################################################################*/ | |
var url = "https://api.github.com/users/billybong/repos"; | |
var response; |
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
{ | |
"stats": { | |
"totalNumberOfWizards": 9, | |
"mostUsedSpell": "dixit", | |
"totalNumberOfSpellsCast": 5093, | |
"spellUsageBreakdown": [ | |
{ | |
"spellName": "dixit", | |
"count": 14 | |
}, |
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
In the event loop, each cycle do this: | |
class Player { | |
const carbsAbsorptionRate; // how many carbs are absorbed per cycle | |
const insulinAbsorptionRate; // how many units of insulin are absorbed per cycle | |
const carbsPerInsulinUnit; // how many grams of carbs are metabolise per insulin unit | |
const carbsToHealthMagicNumber; // how many carbs convert to 1 unit of player health when metabolised | |
const carbsToBGLMagicNumber; // how many carbs convert to one point of BGL when unmetabolised | |
const BGLCorrectionPerInsulinUnitMagicNumber; // how many BGL points drop per one unit of insulin without carbs | |
carbsOnBoard; // current carbs onboard |
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
const fs = require('fs'); | |
const package = JSON.parse(fs.readFileSync('./package.json')); | |
//console.log(package); | |
const deps = package.dependencies; | |
console.log(deps); | |
for (let i = 0; i < Object.keys(deps).length; i++) { |
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
const magik = magikcraft.io; | |
let T1, Java; | |
const BossBarAPI = Java.type("org.inventivetalent.bossbar.BossBarAPI"); | |
function t1() { | |
var TextComponent = Java.type("net.md_5.bungee.api.chat.TextComponent"); | |
T1 = { | |
state: | |
{ |