# Install TimescaleDB
RUN apt update \
&& apt install -y gnupg postgresql-common apt-transport-https lsb-release wget \
&& /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y \
&& echo "deb https://packagecloud.io/timescale/timescaledb/debian/ $(lsb_release -c -s) main" | tee /etc/apt/sources.list.d/timescaledb.list \
&& wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | apt-key add - \
&& apt update \
&& apt install timescaledb-2-postgresql-15 -y
View timescaledb.md
View tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet
start new:
tmux
start new with session name:
tmux new -s myname
View Flasher.sol
This file contains 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
// SPDX-License-Identifier: GPL-3.0-or-later | |
pragma solidity 0.8.11; | |
pragma experimental ABIEncoderV2; | |
import "lib/ds-test/src/test.sol"; | |
import { IERC20 } from "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; | |
import { SafeERC20 } from "lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol"; | |
import { IUniswapAdapter } from "../../interfaces/IUniswapAdapter.sol"; |
View FuseLeveragedTokenAccessControl.t.sol
This file contains 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
// SPDX-License-Identifier: GPL-3.0-or-later | |
pragma solidity 0.8.11; | |
pragma experimental ABIEncoderV2; | |
import "lib/ds-test/src/test.sol"; | |
import { IERC20 } from "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; | |
import { FuseLeveragedToken } from "../FuseLeveragedToken.sol"; | |
import { HEVM } from "./HEVM.sol"; | |
import { gohm, fgohm, usdc, fusdc, sushiRouter } from "./Arbitrum.sol"; |
View UniswapV3Preview.sol
This file contains 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
// SPDX-License-Identifier: GPL-3.0-or-later | |
pragma solidity 0.8.11; | |
pragma experimental ABIEncoderV2; | |
import "lib/ds-test/src/test.sol"; | |
import { IERC20 } from "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; | |
import { SafeERC20 } from "lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol"; | |
import { gohm, usdc, weth, uniswapV2Router } from "chain/Tokens.sol"; | |
import { IUniswapV2Router02 } from "../../interfaces/IUniswapV2Router02.sol"; |
View SushiFlashSwap.sol
This file contains 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
// SPDX-License-Identifier: GPL-3.0-or-later | |
pragma solidity 0.8.11; | |
pragma experimental ABIEncoderV2; | |
import "lib/ds-test/src/test.sol"; | |
import { IUniswapV2Factory } from "../interfaces/IUniswapV2Factory.sol"; | |
import { IUniswapV2Router02 } from "../interfaces/IUniswapV2Router02.sol"; | |
import { IUniswapV2Pair } from "../interfaces/IUniswapV2Pair.sol"; | |
import { IERC20 } from "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; |
View starship.toml
This file contains 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
[character] | |
success_symbol = "[✦](bold green)" | |
[directory] | |
style = "bold green" | |
[git_branch] | |
symbol = "🌱 " | |
style = "bold green" |
View .ethrc.sh
This file contains 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
# Ethereum helper methods | |
# source this in your .bashrc or .zshrc file with `. ~/.ethrc` | |
# --- Token addresses --- | |
aave=0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9 | |
comp=0xc00e94Cb662C3520282E6f5717214004A7f26888 | |
crv=0xD533a949740bb3306d119CC777fa900bA034cd52 | |
dai=0x6B175474E89094C44Da98b954EedeAC495271d0F | |
gtc=0xDe30da39c46104798bB5aA3fe8B9e0e1F348163F | |
mkr=0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2 |
View EDVR_test_video_without_gt.py
This file contains 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
class VideoTestDatasetWithoutGT(data.Dataset): | |
"""Video test dataset. | |
More generally, it supports testing dataset with following structures: | |
dataroot | |
├── subfolder1 | |
├── frame000 | |
├── frame001 | |
├── ... | |
├── subfolder1 | |
├── frame000 |
View Windows 10 Fix docker-credential-desktop not installed or not available in PATH.md
When try to run AWS Lambda locally on windows:
sam local invoke
I got the following error:
Invoking app.lambda_handler (python3.8)
NewerOlder