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
async function getPriorityFees(instructions: TransactionInstruction[]): Promise<number> { | |
// replace with real function | |
return 426; | |
} | |
async function getSimulationUnits( | |
connection: Connection, | |
instructions: TransactionInstruction[], | |
payer: PublicKey, | |
lookupTables: AddressLookupTableAccount[] |
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
extends Node2D | |
### Export variables | |
export var g_copies_of_each: int = 2 | |
# y measured from bottom of sprites, so characters all line up | |
export var g_min_y: int = 860 | |
export var g_max_y: int = 860 | |
export var g_min_spawn_wait_ms = 1000 | |
export var g_max_spawn_wait_ms = 2000 | |
export var g_path: String = "" |
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
--- An abstract implementation of an object pool | |
-- @usage | |
-- local pool = require("pool"){ | |
-- initialize = function(elem) elem.name = "John Doe"; return elem end; | |
-- max = 50; | |
-- } | |
-- local elem = pool:get() -- Creates a new element because pool is empty | |
-- print(elem.x) --> John Doe -- pool:put(elem) -- Puts element back into pool --- You know, the thing that this is all about, the pool class -- @type pool | |
local math = require "math" |
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
Malevolent | |
Rudimentary body potion | |
Oculus Potion | |
Ever | |
Hermadeye Glo Poils | |
Rano Potion | |
Grand Potion | |
Solution Antidote | |
Befuddlemishing Potion Potion | |
Girding Potion |
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
// usage: | |
// importScript('./path/to/script.js').then((allExports) => { .... })); | |
function importScript(path) { | |
let entry = window.importScript.__db[path]; | |
if (entry === undefined) { | |
const escape = path.replace(`'`, `\\'`); | |
const script = Object.assign(document.createElement('script'), { | |
type: 'module', | |
textContent: `import * as x from '${escape}'; importScript.__db['${escape}'].resolve(x);`, | |
}); |
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 options = { | |
username: 'blah', | |
server: '127.0.0.1' | |
}; | |
var ConfigObject = (function(params) { | |
var username = params.username || '', | |
server = params.server || '', | |
password = params.password || ''; |
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
/** | |
* Copyright 2017 Google Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* https://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
<?php | |
class PasswordGenerator { | |
var $pwdMinLength = 12; | |
var $pwdMaxLength = 20; | |
var $pwdMap = [ | |
[ | |
'chars' => 'abcdefghijklmnopqrstuvwxyz', | |
'weight' => 30, | |
], |
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
local lpeg = require 'lpeg' | |
local L = lpeg.locale() | |
local P,V,C,Ct,S,R,Cg,Cc = | |
lpeg.P, lpeg.V, lpeg.C, lpeg.Ct, lpeg.S, lpeg.R, lpeg.Cg, lpeg.Cc | |
local ws = S'\r\n\f\t\v ' | |
local ws0 = ws^0 | |
local ws1 = ws^1 | |
local name = S'_ ' + L.digit + L.alpha |
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(window) { | |
'use strict'; | |
/** | |
* AsyncQueue allows you to create a queue of function to be executed via | |
* setTimout that guaranteed to run in order. This can enable to run | |
* process-intensive operations without locking up UI. | |
* | |
* @constructor |
NewerOlder