Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@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 / palatino.tex
Created September 26, 2015 02:04
Using Palatino font in LaTeX
\usepackage{tgpagella} % text only
\usepackage{mathpazo} % math & text
@bl4ck5un
bl4ck5un / cpuid_sgx.c
Last active January 22, 2024 08:16 — forked from ayeks/cpuid_sgx.c
CPUID - Intel SGX Capabilities Detection (Extended)
/*
* This is based on ayeks's gist. I added a detailed parsing of Leaf 1 and Leaf 2 and higher.
*
* Fan Zhang
*/
#include <stdio.h>
#include <stdint.h>
#define POW2(n) (1 << n)
#define B2MB(b) (b << 20)
@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"],
\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 / install-squid.sh
Created October 8, 2015 14:21 — forked from cdodd/install-squid.sh
Install a basic squid proxy with authentication on Centos 6 x64. Just modify the variables at the top and run the script on a clean system.
#!/bin/sh
PROXY_USER=user
PROXY_PASS=password
PROXY_PORT=3128
# Clear the repository index caches
yum clean all
# Update the operating system
@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 / 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 / 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());