Skip to content

Instantly share code, notes, and snippets.

View jyap808's full-sized avatar

Julian Y jyap808

View GitHub Profile
@jyap808
jyap808 / public_key_decrypt_gpg_base64.go
Created January 9, 2014 20:32
Decrypting a base64 GPG public key encrypted string using a passphrase protected private key in ASCII armor format
package main
import (
"bytes"
"code.google.com/p/go.crypto/openpgp"
"encoding/base64"
"fmt"
"io/ioutil"
"log"
)
@jyap808
jyap808 / JBSclaimedaddresses.txt
Last active October 10, 2018 00:06
JBS claimed addresses - Signed messages
JBS Address UBQ Address (message) Signature
JJgMRVtSsjaoj8ZwSeWmgYHxx3Lm4MmVEM 0x3e5429d2c0D046430709F2001867fC5dAEd5DC79 H2irrHUv4HAh85mVPMxsywPKz7HTdijIbAHiUp2aJPPFmSiiXE9UsF+q7GSbc9WeE9Qs4fSJHTqaMTnYDEPQoy4=
JK5cjW1BiiLB8AUGRThE7Gt4TeJE7uauhC 0xD53788af956e7622Cfd258669036d37F07CB8B29 IMiur7lgHPQRXVZxethw8GdKHk924eeZ0WmUWpYNj6aEdainejVrxerZoPb6wcwL5W0ttGxUcpBbtzyaWUki9VU=
JK7v1tvm87oMNkrQViJG7zbb64vqcV2oVH 0xfa99053b813C6E47b0e2dd561848B028AE5396B3 IHIflksnd9OGIXqH3yDmigCAxhh138UQIWNZiXMuWpTAXgOlI7iZl96jHFwdgv0h+ZpQUFTaUqIIQtqp0aWbZJ0=
JKCidRbYRU3H38t5fixW6npQXG8hnP5aP9 0xF7cd47d4354f54aAD36861Cba8d9B666989fd496 ICN6Oq8+8Fd5r1aQJ0PKAjZub0GyuXhAnDJgJAtTvQW0lwgR2XjIzX4JVJ7H57iTSXGKFSoO8jTGDV7yOhOYGlU=
JKEEEbhpGNkPmKGfjVatFypwcU94y1EpSK 0xbF54b793938e9C83A1b1eFd5c8101BFa7f14942B IM5aofC6WXis+g9k0m+anbIt0uQ44mJ810j4YuyG6OJTyz2jzyNm5rmcB2CdGove9vVGqXOP1cyzAoKY+3VAO/A=
JKF2JvWS9scV419TvNR6epRqLP1gzPAvQS 0xBA0d2d3BECc70b355E9A1971C
@jyap808
jyap808 / UbiqNucleusBlock.json
Last active September 4, 2017 08:00
Ubiq Nucleus Block
{
"nonce": "0x0000000000000888",
"timestamp": "0x588CF840",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x0",
"gasLimit": "0x8000000",
"difficulty": "0x12A05F2000",
"extraData": "0x4a756d6275636b734545",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x3333333333333333333333333333333333333333",
@jyap808
jyap808 / decrypt_gpg_armor_private_key.go
Created January 8, 2014 01:25
Decrypting an ASCII armored GPG encrypted string using a private key (no passphrase) in ASCII armor format
package main
import (
"bytes"
"code.google.com/p/go.crypto/openpgp"
"code.google.com/p/go.crypto/openpgp/armor"
"fmt"
"io/ioutil"
"log"
)
@jyap808
jyap808 / jbs_block_1284688.txt
Created April 2, 2017 11:25
Jumbucks - State of the ledger at block 1284688 (minted : Sat Jan 28 08:07:16 2017)
This file has been truncated, but you can view the full file.
---------------------------------------------------------------------------
State of the ledger at block 1284688 (minted : Sat Jan 28 08:07:16 2017)
---------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Balance Hash160 Base58 nbIn lastTimeIn nbOut lastTimeOut
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
597245.70000000 5aa5ada8189f6b8f993a37c01b3e95bd2bd802ee JSoEdU717hvz8KQVq2HfcqV9A79Wihzusu 107 Fri Jan 27 19:55:28 2017 103 Fri Jan 27 22:51:12 2017
151186.72074621 5444bbb3cd652d0f4aaa065ad6baf20c98c5cf37 JSDWST7ufWikR9awYDr9BatxVfHcWxVyVh 17 Thu Jan 5 17:30:26 201
@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 / blake256.go
Created January 7, 2016 00:50
Blake 256 hash
package main
import (
"encoding/hex"
"fmt"
"github.com/decred/blake256"
)
func main() {
@jyap808
jyap808 / resize_swap_lvm.md
Created January 28, 2014 21:33
Resize a swap LVM volume
swapoff /dev/vg_foo/lv_swap
lvextend -L+100M /dev/vg_foo/lv_swap
mkswap /dev/vg_foo/lv_swap
swapon /dev/vg_foo/lv_swap

That is: disable swapping on the volume, extend it, re-create the swap area and enable swapping again.

Swap will need to be recreated with mkswap to the new size to be seen.

Modified From: http://oxygene.sk/2009/12/resizing-a-lvm-swap-volume/

@jyap808
jyap808 / resize_ext4_lvm_boot_cd.md
Last active January 4, 2016 20:49
Resize an ext4 LVM volume with a boot CD

Find the name of the Volume Group (henceforth “somevg”) that contains the root Logical Volume:

sudo lvs

(If it’s not showing up, try running sudo lvmdiskscan and sudo pvscan then try again.)

If you run ls /dev/mapper/ you may see that the Logical Volumes is not showing up. If it’s not there, you need to run the following command to make the kernel aware of the logical volumes:

sudo vgchange --available y <somevg>
@jyap808
jyap808 / text_template_example.go
Created January 5, 2014 07:59
Example of using the "text/template" module
package main
import (
"os"
"text/template"
)
type Person struct {
Name string //exported field since it begins with a capital letter
}