Skip to content

Instantly share code, notes, and snippets.

View davidvuong's full-sized avatar
spaghetti mgmt

David Vuong davidvuong

spaghetti mgmt
View GitHub Profile
@barrasso
barrasso / SnxFlashLoan.sol
Last active March 6, 2024 17:06
simple aave flash loan contract to pay off snx debt position on v2x
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
import "https://github.com/aave/aave-v3-core/blob/master/contracts/flashloan/base/FlashLoanSimpleReceiverBase.sol";
import "https://github.com/aave/aave-v3-core/blob/master/contracts/interfaces/IPoolAddressesProvider.sol";
import "https://github.com/aave/aave-v3-core/blob/master/contracts/dependencies/openzeppelin/contracts/IERC20.sol";
import "https://github.com/Synthetixio/synthetix/blob/develop/contracts/interfaces/ISynthetix.sol";
import "https://github.com/Uniswap/v3-periphery/blob/main/contracts/interfaces/ISwapRouter.sol";
contract SnxFlashLoan is FlashLoanSimpleReceiverBase {
@angerman
angerman / Installation.md
Last active February 1, 2024 11:38
Installing nix on macOS BigSur

The nixos.org website suggests to use:

sh <(curl -L https://nixos.org/nix/install)

For macOS on Intel (x86_64) or Apple Silicon (arm64) based macs, we need to use

sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume
@zhanwenchen
zhanwenchen / Install NVIDIA Driver and CUDA.md
Last active March 13, 2024 23:42 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA CUDA 9.0 on Ubuntu 16.04.4 LTS
@bojand
bojand / index.md
Last active March 1, 2024 19:32
gRPC and Load Balancing

Just documenting docs, articles, and discussion related to gRPC and load balancing.

https://github.com/grpc/grpc/blob/master/doc/load-balancing.md

Seems gRPC prefers thin client-side load balancing where a client gets a list of connected clients and a load balancing policy from a "load balancer" and then performs client-side load balancing based on the information. However, this could be useful for traditional load banaling approaches in clound deployments.

https://groups.google.com/forum/#!topic/grpc-io/8s7UHY_Q1po

gRPC "works" in AWS. That is, you can run gRPC services on EC2 nodes and have them connect to other nodes, and everything is fine. If you are using AWS for easy access to hardware then all is fine. What doesn't work is ELB (aka CLB), and ALBs. Neither of these support HTTP/2 (h2c) in a way that gRPC needs.

@nagelflorian
nagelflorian / buckets.tf
Last active February 12, 2024 07:44
Terraform config for static website hosting on AWS
# AWS S3 bucket for static hosting
resource "aws_s3_bucket" "website" {
bucket = "${var.website_bucket_name}"
acl = "public-read"
tags {
Name = "Website"
Environment = "production"
}
@leonardofed
leonardofed / README.md
Last active April 24, 2024 01:47
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@wangruohui
wangruohui / Install NVIDIA Driver and CUDA.md
Last active April 23, 2024 02:03
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@toolmantim
toolmantim / pipeline.sh
Last active December 8, 2022 07:19
Ensuring Buildkite pipeline steps run on the same agent, using a dynamic pipeline generator script
#!/bin/bash
# Outputs a pipeline that targets agents that have the same 'name' meta-data
# value as the step that does the pipeline upload. This means that all the
# steps will run on the same agent machine, assuming that the 'name' meta-data
# value is unique to each agent.
#
# Each agent needs to be configured with meta-data like so:
#
# meta-data="name=<unique-name>"
/* Deleting a node from Binary search tree */
#include<iostream>
using namespace std;
struct Node {
int data;
struct Node *left;
struct Node *right;
};
//Function to find minimum in a tree.
Node* FindMin(Node* root)
@ngryman
ngryman / README.md
Last active January 16, 2023 14:07
intellij javascript live templates

intellij javascript live templates

Just a dump of handy live templates I use with IntelliJ. They should also work with WebStorm.

How to

  • Go to settings.
  • Search for live templates.
  • Under the javascript section you should be able to manage your templates.