Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

\usepackage{todonotes}
\newcounter{todocounter}
\newcommand{\todonum}[2][]
{\stepcounter{todocounter}\todo[#1]{(\thetodocounter) #2}}
\newif\ifshowcomment
\showcommenttrue
\ifshowcomment
\newcommand{\fanz}[1]{\stepcounter{todocounter}\textcolor{blue}{{\small [[(\thetodocounter) Fan: #1]]}}}
\newcommand{\FZ}[1]{\todonum[inline,color=blue!20,size=\footnotesize,caption={}]{#1 \hfill \mbox{-Fan}}}
@bl4ck5un
bl4ck5un / geth.diff
Last active September 7, 2022 01:25
Patch to eth-docker default
diff --git a/geth.yml b/geth.yml
index 33578eb..86d6431 100644
--- a/geth.yml
+++ b/geth.yml
@@ -46,7 +46,7 @@ services:
- --http.vhosts=*
- --http.corsdomain=*
- --http.api
- - web3,eth,net
+ - web3,eth,net,txpool
@bl4ck5un
bl4ck5un / docker-compose.yml
Created January 23, 2020 03:39
unblockneteasemusic docker compose
version: '3'
services:
unblockneteasemusic:
image: nondanee/unblockneteasemusic
environment:
NODE_ENV: production
ports:
- 8080:8080
- 8081:8081
#include "emp-sh2pc/emp-sh2pc.h"
using namespace emp;
using namespace std;
const string circuit_file_location = macro_xstr(EMP_CIRCUIT_PATH);
int port, party;
string file = circuit_file_location+"/AES-non-expanded.txt";//adder_32bit.txt";
CircuitFile cf(file.c_str());
@bl4ck5un
bl4ck5un / ck.diff
Created February 25, 2019 21:09
Difference between the old and the new cryptokitties' geneScience smart contract
diff --git a/old.sol b/new.sol
index 0184107..1419bcd 100644
--- a/old.sol
+++ b/new.sol
@@ -1,16 +1,35 @@
pragma solidity ^0.4.18;
-
+contract KittyCoreInterface {
+ function cooAddress() public returns(address);
@bl4ck5un
bl4ck5un / bitcoin.conf
Last active March 1, 2024 21:03
Simple bitcoind config for regtest
##
## bitcoin.conf configuration file. Lines beginning with # are comments.
##
daemon=1
regtest=1
listen=0
# JSON-RPC options (for controlling a running Bitcoin/bitcoind process)
rpcuser=exch
@bl4ck5un
bl4ck5un / sgx_status.h
Last active May 2, 2018 02:15
To fix the missing "sgx_status.h" error in https://shwetasshinde24.github.io/Panoply/
/**
*
* Copyright(c) 2011-2016 Intel Corporation All Rights Reserved.
*
* The source code contained or described herein and all documents related to
* the source code ("Material") are owned by Intel Corporation or its suppliers
* or licensors. Title to the Material remains with Intel Corporation or its
* suppliers and licensors. The Material contains trade secrets and proprietary
* and confidential information of Intel or its suppliers and licensors. The
* Material is protected by worldwide copyright and trade secret laws and treaty
@bl4ck5un
bl4ck5un / sgx_v1.9.0.sh
Created October 2, 2017 21:20
Install SGX SDK v1.9.0
#!/bin/sh -e
SGX_SDK_BIN=sgx_sdk.bin
wget -O $SGX_SDK_BIN https://download.01.org/intel-sgx/linux-1.9/sgx_linux_ubuntu16.04.1_x64_sdk_1.9.100.39124.bin
chmod a+x $SGX_SDK_BIN
echo -e 'no\n/opt/intel' | sudo ./$SGX_SDK_BIN
echo 'source /opt/intel/sgxsdk/environment' >> ~/.zshrc
@bl4ck5un
bl4ck5un / responsive-semantic-ui.css
Created May 12, 2017 03:20
Responsive helpers (mobile-only etc.) for semantic-ui
/* Semantic UI has these classes, however they're only applicable to*/
/* grids, containers, rows and columns.*/
/* plus, there isn't any `mobile hidden`, `X hidden` class.*/
/* this snippet is using the same class names and same approach*/
/* plus a bit more but to all elements.*/
/* see https://github.com/Semantic-Org/Semantic-UI/issues/1114*/
/* Mobile */
@media only screen and (max-width: 767px) {
[class*="mobile hidden"],
@bl4ck5un
bl4ck5un / Application.sol
Created April 17, 2017 01:24
Application Contract for Town Crier
contract Application {
event Request(int64 requestId, address requester, uint dataLength, bytes32[] data);
event Response(int64 requestId, address requester, uint64 error, uint data);
event Cancel(uint64 requestId, address requester, bool success);
uint constant MIN_GAS = 30000 + 20000;
uint constant GAS_PRICE = 5 * 10 ** 10;
uint constant TC_FEE = MIN_GAS * GAS_PRICE;
uint constant CANCELLATION_FEE = 25000 * GAS_PRICE;