Skip to content

Instantly share code, notes, and snippets.

View landakram's full-sized avatar

Mark Hudnall landakram

View GitHub Profile
@cryptoscopia
cryptoscopia / dydxFlashLoanTemplate.sol
Created October 21, 2020 06:42
A single-file simplest possible template for a contract that obtains a flash loan from dydx, does things, and pays it back.
// SPDX-License-Identifier: AGPL-3.0-or-later
// The ABI encoder is necessary, but older Solidity versions should work
pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;
// These definitions are taken from across multiple dydx contracts, and are
// limited to just the bare minimum necessary to make flash loans work.
library Types {
enum AssetDenomination { Wei, Par }
@darconeous
darconeous / tesla-key-card-protocol.md
Last active June 27, 2024 15:08
Tesla Key Card Protocol

Tesla Key Card Protocol

Researched by Robert Quattlebaum darco@deepdarc.com.

Last updated 2020-02-03.

Image of Tesla Key Card Image of Tesla Model 3 Key Fob

@onpaws
onpaws / manifests.yaml
Created May 12, 2019 13:59
Fixed manifests for parity 2.5.0
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
namespace: default
name: pv-default-100g-disk01
annotations:
volume.beta.kubernetes.io/storage-class: default
spec:
accessModes:
- ReadWriteOnce
@steve-ayerhart
steve-ayerhart / firmware.scm
Created September 27, 2018 22:35
Guixbook Pro
(define-module (bbbsd packages firmware)
#:use-module (guix download)
#:use-module (guix build-system trivial)
#:use-module (guix build-system gnu)
#:use-module (guix build utils)
#:use-module (guix utils)
#:use-module (guix packages)
#:use-module (gnu packages)
#:use-module (gnu packages python))
@yefim
yefim / Dockerrun.aws.json
Last active April 7, 2023 16:11
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk
{
"AWSEBDockerrunVersion": "1",
"Image": {
"Name": "<AWS_ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com/<NAME>:<TAG>",
"Update": "true"
},
"Ports": [
{
"ContainerPort": "443"
}
@noxi515
noxi515 / MainActivity.java
Created December 11, 2012 14:48
Tab + ChildFragment sample
package jp.noxi.sample;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTabHost;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;