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
package flash; | |
#if !flash_no_alchemy extern #end class Memory { | |
#if flash_no_alchemy | |
private static var mem:flash.utils.ByteArray = prepareInitialByteArray(); | |
private static function prepareInitialByteArray ():flash.utils.ByteArray { | |
var b = new flash.utils.ByteArray(); | |
b.endian = flash.utils.Endian.LITTLE_ENDIAN; |
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
/** | |
* Renders a lighting mask which can be added to the display list via Bitmap. | |
* @author Sam MacPherson | |
*/ | |
package as3gl.lighting; | |
import as3gl.core.Destroyable; | |
import as3gl.core.Runnable; | |
import as3gl.display.Batcher; |
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
R (Rotation) = [ cosA -sinA, sinA cosA ], S (Scale) = [ Sx 0, 0 Sy ] | |
M = RS | |
M11 = Sx*cosA | |
M21 = Sx*sinA | |
=> tanA = M21 / M11 | |
=> A = arctan(M21 / M11) |
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
#!/bin/bash | |
#################################################### | |
# Deploy all scripts on chain to prepare for spell | |
# | |
# Requires MCD environment variables to be in scope https://changelog.makerdao.com/releases/kovan/active/contracts.json | |
# | |
# Usage: ./collateral_deploy.sh <DSS GEM JOIN DIR> <GEM JOIN VARIANT> <ILK> <TOKEN ADDRESS> | |
# Example: ./collateral_deploy.sh ~/dev/makerdao/dss-gem-joins GemJoin5 ETH-A 0xe3dD56821f8C422849AF4816fE9B3c53c6a2F0Bd | |
#################################################### |
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
gp() { | |
if [ $# -eq 0 ] | |
then | |
echo Gas price is $(echo $ETH_GAS_PRICE / 1000000000 | bc) Gwei | |
return | |
elif [ "$1" = "fast" ] | |
then | |
GAS_GWEI=$(curl -s "https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey=APIKEY" | jq -r .result.FastGasPrice) | |
elif [ "$1" = "trade" ] | |
then |
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
# Setup variables | |
export PS1="\[\e[32m\]\W\[\e[91m\]\$(parse_git_branch)\[\e[00m\] $ " | |
export DEFAULT_PS1="$PS1" | |
# RPC Endpoints | |
export REMOTE_MAINNET_RPC_URL=https://eth-mainnet.alchemyapi.io/v2/XXX | |
export OFFICE_MAINNET_RPC_URL=http://geth.dappnode:8545 | |
export MAINNET_RPC_URL="$REMOTE_MAINNET_RPC_URL" | |
export OPTIMISM_RPC_URL=https://opt-mainnet.g.alchemy.com/v2/XXX |