Skip to content

Instantly share code, notes, and snippets.

View jyap808's full-sized avatar

Julian Y jyap808

View GitHub Profile
@jyap808
jyap808 / Paycoin Proof of Work analysis.md
Last active August 29, 2015 14:12
Paycoin Proof of Work analysis
@jyap808
jyap808 / Zetacoin mining schedule reviewed.md
Last active August 19, 2016 05:36
Zetacoin mining schedule reviewed

I've read that many people believe that Zetacoin has a predominantly "1 year" mining schedule. I believe the Announcement is very misleading in this regards. Here are some facts.

The Zetacoin ANN states :

  • Block reward: 1000 ZET, halving every 80640 blocks (about 1 month), not dropping below 1 ZET (inflationary)
  • Total coin supply: 160 million ZET + small yearly inflation
  • 160 million coins will be mined in around first year

Below are time stamps, blocks at change in mining reward and coin supply at those blocks.

@jyap808
jyap808 / AWS swap file.md
Created November 30, 2014 05:29
AWS swap file

Swap should take place on the Instance Storage (ephemeral) disk and not an EBS device. Swapping will cause a lot of IO and will increase cost on EBS. EBS is also slower than the Instance Store and the Instance Store comes free with the EC2 Instance.

It will usually be mounted to /mnt but if not run

sudo mount /dev/xvda2 /mnt

To then create a swap file on this device do the following for a 4GB swapfile

@jyap808
jyap808 / gist:d69f29e4aefcc6723476
Created August 10, 2014 02:57
Onename.io verification
Verifying myself: My Bitcoin username is +jyap. https://onename.io/jyap
@jyap808
jyap808 / swap_file.md
Created August 6, 2014 06:56
Create file system swap file
sudo dd if=/dev/zero of=/mnt/myswapfile bs=1M count=1024
ls -l /mnt/myswapfile
sudo chmod 600 /mnt/myswapfile
sudo mkswap /mnt/myswapfile
sudo swapon /mnt/myswapfile

sudo vi /etc/fstab
@jyap808
jyap808 / codesign_verify.md
Last active August 29, 2015 14:03
Mac OS X Verify applications signature
$ codesign -dvvv Bitcoin-Qt.app
Executable=/Applications/Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt
Identifier=org.bitcoinfoundation.Bitcoin-Qt
Format=bundle with Mach-O thin (x86_64)
CodeDirectory v=20100 size=153121 flags=0x0(none) hashes=7649+3 location=embedded
Hash type=sha1 size=20
CDHash=68b2974f209336f9b90a2435768a0ebac4d3b945
Signature size=8544
Authority=Developer ID Application: BITCOIN FOUNDATION, INC., THE
@jyap808
jyap808 / mapCheckpoints and mapStakeModifierCheckpoints.md
Created June 12, 2014 06:46
mapCheckpoints and mapStakeModifierCheckpoints
@jyap808
jyap808 / Nginx Virtual Host Log Format.md
Created April 13, 2014 05:03
Nginx Virtual Host Log Format
$ diff -u /etc/nginx/nginx.conf{.ORIG,}
--- /etc/nginx/nginx.conf.ORIG  2014-04-13 04:15:51.907316500 +0000
+++ /etc/nginx/nginx.conf       2014-04-13 05:02:22.807316500 +0000
@@ -30,7 +30,9 @@
        # Logging Settings
        ##
 
-       access_log /var/log/nginx/access.log;
+ log_format vhosts '$host $remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"';
@jyap808
jyap808 / Shrink MongoDB journal files.md
Created April 8, 2014 20:46
Shrink MongoDB journal files

In the MongoDB configuration file add the following line:

smallfiles=true

The safety shut off MongoDB and remove the journal files.

Full procedure:

@jyap808
jyap808 / keybase.md
Created April 2, 2014 20:37
Keybase verification

Keybase proof

I hereby claim:

  • I am jyap808 on github.
  • I am jyap (https://keybase.io/jyap) on keybase.
  • I have a public key whose fingerprint is 685B 5017 6420 1448 6543 0475 C3BD 0552 7F66 1F0A

To claim this, I am signing this object: