Skip to content

Instantly share code, notes, and snippets.

@xiaojay
xiaojay / 2013-08-B.txt
Created February 29, 2016 17:50 — forked from jbryer/2013-08-B.txt
ShinyAssessmentTest
From San Francisco to New York to Paris, city governments, high-class restaurants,
schools, and religious groups are ditching bottled water in favor of what comes out of the
faucet. With people no longer content to pay 1,000 times as much for bottled water, a
product no better than water from the tap, a backlash against bottled water is growing.
(5) The U.S. Conference of Mayors, which represents some 1,100 American cities,
discussed at its June 2007 meeting the irony of purchasing bottled water for city employees
and for city functions while at the same time touting1 the quality of municipal water. The
group passed a resolution sponsored by Mayors Gavin Newsom of San Francisco, Rocky
Anderson of Salt Lake City, and R. T. Rybak of Minneapolis that called for the examination
(10) of bottled water’s environmental impact. The resolution noted that with $43 billion a year
@xiaojay
xiaojay / Add dbSNP IDs to a VCF file
Created September 15, 2016 06:47 — forked from obenshaindw/Add dbSNP IDs to a VCF file
Add dbSNP IDs to a VCF file that doesn't have them.
#GATK Method <- Slower and keeps original ID plut dbSNP rsID
# R=Reference FASTA
# V=VCF file to add IDs to
# --dbsnp = dbsnp VCF -- download from NCBI FTP
java -jar GenomeAnalysisTK.jar -R /reference/Homo_sapiens_assembly19.fasta -T VariantAnnotator -V vcf_to_add_id_to.vcf --dbsnp /reference/dbsnp_137.b37.vcf.gz --out /data/Broad.chr1.annotated.vcf
#bcftools Method <- Faster, replaces existing ID with dbSNP rsID
/usr/bin/htslib/bcftools/bcftools annotate -a /reference/dbsnp_137.b37.vcf.gz -c ID vcf_to_add_id_to.vcf
@xiaojay
xiaojay / how-to-use-web3-with-react-native.md
Created April 23, 2018 14:53
This file describes how to set up the Ethereum JS API web3.js with the boilerplate Create React Native App

How to set up web3.js with CRNA

This is a simple guide to get you started with using the Ethereum Javascript API (web3.js) with the Create React Native App project. This is not an in-depth guide.

  1. Make sure you have Node version 6 or later installed, if not, get it on the Node website

    node --version

  2. Install Create React Native App

@xiaojay
xiaojay / how-to-use-web3-with-react-native.md
Created April 23, 2018 14:53
This file describes how to set up the Ethereum JS API web3.js with the boilerplate Create React Native App

How to set up web3.js with CRNA

This is a simple guide to get you started with using the Ethereum Javascript API (web3.js) with the Create React Native App project. This is not an in-depth guide.

  1. Make sure you have Node version 6 or later installed, if not, get it on the Node website

    node --version

  2. Install Create React Native App

@xiaojay
xiaojay / how-to-use-web3-with-react-native.md
Created April 23, 2018 14:53
This file describes how to set up the Ethereum JS API web3.js with the boilerplate Create React Native App

How to set up web3.js with CRNA

This is a simple guide to get you started with using the Ethereum Javascript API (web3.js) with the Create React Native App project. This is not an in-depth guide.

  1. Make sure you have Node version 6 or later installed, if not, get it on the Node website

    node --version

  2. Install Create React Native App

@xiaojay
xiaojay / namebase.py
Created February 20, 2020 12:04 — forked from jat001/namebase.py
Sell HNS automatically
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
from decimal import Decimal
from datetime import datetime
try:
import requests
import simplejson as json
@xiaojay
xiaojay / BLS_Signature.md
Created May 6, 2020 02:24
BLS Signature for Busy People

BLS Signature for Busy People

Summary

  • BLS stands for

    • Barreto-Lynn-Scott: BLS12, a Pairing Friendly Elliptic Curve.
    • Boneh-Lynn-Shacham: A Signature Scheme.
  • Signature Aggregation

  • It is possible to verify n aggregate signatures on the same message with just 2 pairings instead of n+1.

@xiaojay
xiaojay / BLS_Signature.md
Created May 6, 2020 02:24
BLS Signature for Busy People

BLS Signature for Busy People

Summary

  • BLS stands for

    • Barreto-Lynn-Scott: BLS12, a Pairing Friendly Elliptic Curve.
    • Boneh-Lynn-Shacham: A Signature Scheme.
  • Signature Aggregation

  • It is possible to verify n aggregate signatures on the same message with just 2 pairings instead of n+1.

@xiaojay
xiaojay / notes-medalla.md
Created August 6, 2020 04:29
Notes on setting up Eth2 clients for Medalla testnet (Prysm / Lighthouse / Teku / Nimbus / Lodestar)

Notes on setting up Eth2 clients for Medalla testnet (Prysm / Lighthouse / Teku / Nimbus / Lodestar)

PLEASE NOTE:

  • Prysm, Lighthouse, and Teku are attesting and proposing correctly following this guide
  • Nimbus currently has a glitch that it syncs the beacon chain well but can't post any attestations. An issue has been created: #1443
  • Lodestar also has a glitch that the beacon client hangs up and won't sync the beacon chain
  • This guide will be updated once these issues have been resolved

Using the launchpad

--------------------------------------------
- Format 2 NVMe SSD Drives
--------------------------------------------
NOTE: NVMe SSD Drives are Ephemeral! Data will
survive hard and soft reboots, but not stop/start
cycles via the AWS Console.
sudo fdisk -l|more
sudo fdisk /dev/nvme0n1
n
p