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
// @ts-check | |
import { defineConfig } from "astro/config"; | |
import starlight from "@astrojs/starlight"; | |
import starlightOpenAPI, { openAPISidebarGroups } from "starlight-openapi"; | |
const schemaUrl = | |
process.env.NODE_ENV === "production" | |
? "https://demo.api.string-theory.finance/api" | |
: "http://localhost:8000/api"; |
This file has been truncated, but you can view the full file.
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
{ | |
"openapi": "3.1.0", | |
"info": { | |
"title": "String Theory API", | |
"version": "Evergreen" | |
}, | |
"paths": { | |
"/v2/deposit": { | |
"post": { | |
"tags": [ |
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
public class Poison : DamageOverTime | |
{ | |
private Damage DamagePerTick; | |
private static float DEFAULT_DURATION = 10f; | |
private static float DEFAULT_PERIOD = 1f; | |
private static HashSet<DamageType> damageTypes = new HashSet<DamageType> { DamageType.DAMAGE_OVER_TIME, DamageType.POISON }; | |
public Poison(float damageAmountPerTick) : base(new Damage(damageTypes, damageAmountPerTick * (DEFAULT_DURATION / DEFAULT_PERIOD)), DEFAULT_PERIOD, DEFAULT_DURATION) | |
{ | |
DamagePerTick = new Damage(damageTypes, damageAmountPerTick * (DEFAULT_DURATION / DEFAULT_PERIOD)); |
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 hateBattle = async function(battleName, userToken){ | |
const result = await axios.post(`/v1/battle/${battleName}/hate`, {}, createConfig(userToken)); | |
return result.data; | |
}; |
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
'.source.jsx': | |
'react-component': | |
'prefix': 'component' | |
'body': """ | |
import React, {Component} from 'react'; | |
class $1 extends Component { | |
constructor(props){ | |
super(props) | |
} |
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 Client1 = function(args){ | |
var prop1; | |
var prop2; | |
return { | |
prop1: prop1, | |
prop2: prop2 | |
} | |
} |
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
'.source.js': | |
'Describe': | |
'prefix': 'describe' | |
'body': """ | |
describe('$1',function(){ | |
$2 | |
});""" | |
'It': | |
'prefix': 'it' | |
'body': """ |
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 paths = _.toArray(models.Recipient.schema.paths); | |
var requiredFields = paths.filter(function(path){ | |
return path.isRequired; | |
}).reduce(function(last, path){ | |
last[path.path] = path.path; | |
return last; | |
}, {}); | |
console.log(requiredFields); |
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
<script src="bower_components/jquery/dist/jquery.min.js"></script> | |
<script src="bower_components/arbor/lib/arbor.js"></script> | |
<script src="bower_components/arbor/lib/arbor-tween.js"></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
data.relations.forEach(function(relation){ | |
console.log(typeof(relation) + "and " + relation.first_name); | |
graphData.nodes[relation.person_id] = { | |
color: 'green', | |
shape: 'dot', | |
label: relation.first_name + " " + relation.middle_name + " " + relation.last_name | |
} | |
// This line right here always adds the edge to data.person_id... |
NewerOlder