Skip to content

Instantly share code, notes, and snippets.



View GitHub Profile
View ChainlinkExample.sol
pragma solidity ^0.6.0;
import "";
// MyContract inherits the ChainlinkClient contract to gain the
// functionality of creating Chainlink requests
contract ChainlinkExample is ChainlinkClient {
// Stores the answer from the Chainlink oracle
uint256 public currentPrice;
address public owner;
View init.vim
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
rekmarks / newProvider.js
Last active Apr 18, 2021
Using the New MetaMask Inpage Provider
View newProvider.js
// Running on the page, in the browser
// This API will go live in early 2020
// It will be the only API available after a 6-week deprecation period
if (!ethereum || !ethereum.isMetaMask) {
throw new Error('Please install MetaMask.')
import json
import os
from collections import defaultdict
from json import JSONDecodeError
from pprint import pprint
from typing import Dict, Union, List
import requests
from bs4 import BeautifulSoup
function diff-branch() {
if [ -z $1 ]; then
echo please provide an branch
if [ -z $2 ]; then
ageis / .bashrc 02-25-2020
Last active Aug 26, 2021
@ageis's ~/.bashrc 🖥️ with numerous useful functions, aliases and one-liners. ⚠️ NOTE: many paths in sourced scripts and environment variables are specific to my system, but if you dig in I hope you'll find something you can use!
View .bashrc 02-25-2020
# ~/.bashrc: executed by bash(1) for non-login shells.
# kevin gallagher (@ageis) <>
# normally I divide this into separate files: .bashrc, .bash_profile, .bash_aliases and .bash_functions (also .bash_logout), but it's all concatenated here.
ulimit -s unlimited
export MYUID=$(id -u)
export USER="$(id -un)"
if [[ "$TILIX_ID" ]] || [[ "$VTE_VERSION" ]]; then
benjyz /
Last active Jan 30, 2021
trading broker spec

trading broker spec

proposal version 0.01 this is a rough spec for what a client-side trading infrastructure expects from an interface. There should be a client-side wrapper matching the hosts API. we ignore funding requests here (deposit/withdraw)

Wrapper API


rhlsthrm / ReentrancyToken.sol
Created Oct 9, 2018
Fake ERC20 token that recreates reentrancy attack
View ReentrancyToken.sol
pragma solidity ^0.4.23;
import "./HumanStandardToken.sol";
import "../../LedgerChannel.sol";
contract ReentrancyToken is HumanStandardToken {
LedgerChannel ledgerChannel;
uint256 constant MAX_REENTRIES = 5;
uint256 numReentries = 0;
whoisryosuke / api-form-submit.js
Created Oct 3, 2018
React - Handling forms and submitting POST data to API -- @see:
View api-form-submit.js
class NameForm extends React.Component {
constructor(props) {
this.state = { name: '' };
handleChange = (event) => {
mfuzailzubari / nginx.conf
Created Jun 27, 2018
NGINX RTMP Configurations
View nginx.conf
worker_processes auto;
events {
# Allows up to 1024 connections, can be adjusted
worker_connections 1024;
# RTMP configuration
rtmp {
server {
listen 1935; # Listen on standard RTMP port