Skip to content

Instantly share code, notes, and snippets.

View phillipdodd's full-sized avatar

Phillip Dodd phillipdodd

View GitHub Profile
-- incline
for i = 0, 10, 0.5 do
makeOrb(-2, i, i + 1)
makeOrb(-1, i, i + 1)
makeOrb(0, i, i + 1)
makeOrb(1, i, i + 1)
makeOrb(2, i, i + 1)
end
-- vertical
function OnTemplate()
self.AddModel('btoast.models.trophy')
self.CreateSphereCollisions()
self.MakeBuildable()
-- self.AddTexture('btoast.textures.trophy')
end
function OnClone()
self.RegisterListener(Messager.OnEnable, Enabled)
self.RegisterEntityWithTag("solartrophy")
{
// Place your snippets for json here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
Vector = {}
function Vector:new(o)
o = o or {}
setmetatable(o, self)
self.__index = self
return o
end
function Vector:goBack(n)
local newVector = Vector:new({})
// TODO the mentions are all smooshed together. the next needs to include a space between each one
class MentionPayload {
constructor(mentionArray) {
this.type = "paragraph";
this.content = [
{
type: "text",
text: "Automated reminder for: "
},
require('dotenv/config');
const _ = require('lodash');
const logger = require('./myWinston')('binance');
const binance = require('node-binance-api');
const calc = require('./calc');
Object.prototype.renameProp = function(currentPropName, newPropName) {
this[newPropName] = this[currentPropName];
delete this[currentPropName];
}
function fibberGonnaFib(count) {
var fibs = [];
for (var i = 0; i < count; i++) {
fibs.push((fibs[fibs.length - 1] || 1) + (fibs[fibs.length - 2] || 0))
}
return fibs[fibs.length - 1];
}
var theFibbening = [];
var t = new Tree();
t.addNode(21)
t.addNode(74)
t.addNode(3)
t.addNode(7)
t.addNode(5)
t.addNode(63)
t.addNode(58)
t.addNode(57)
t.logValues(102);
var obj = {
done: function () {
if (this.hasOwnProperty('tasks')) {
console.log('each task is complete:');
for (let task of this.tasks) {
console.log(`-- ${task}: ${this[task]}`);
}
}
}
}
function DeFIBrulator() {
this.sequence = [];
this.fibStep = function fibStep(count = 1) {
if (count) {
for (var i = 0; i < count; i++) {
this.x = (this.y + this.z) || 1;
this.sequence.push(this.x)
}
}
};