Skip to content

Instantly share code, notes, and snippets.

View xhad's full-sized avatar
🏠
Working from home

Chad xhad

🏠
Working from home
View GitHub Profile
@xhad
xhad / .sol
Created June 15, 2024 12:00
Index Vault Example
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.8.18;
import {VerifiableAddressArray} from "src/lib/VArray.sol";
import {IVault} from "src/interfaces/IVault.sol";
import {TokenInfo} from "src/Common.sol";
import {IIndexToken} from "src/interfaces/IIndexToken.sol";
import {SCALAR, fdiv, fmul, finv} from "./lib/FixedPoint.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
did:3:bafyreigx5dea4vnzhije5xakg453lpnokhktfokiryqmgs5fct6lkvcujy
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreigx5dea4vnzhije5xakg453lpnokhktfokiryqmgs5fct6lkvcujy ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
@xhad
xhad / sed.txt
Last active February 24, 2017 04:58
Linux Sed, Find Replace
find ./ -type f -name '*.spec.ts' -print0 | xargs -0 sed -i '/^start_string/s/it(/xit(/'
find ./src/modules -type f -exec sed -i '/^/s/it(/xit(/g' {} \;
@xhad
xhad / README.md
Created July 4, 2016 03:52 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@xhad
xhad / nginx.conf
Created July 1, 2016 05:06 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048