Skip to content

Instantly share code, notes, and snippets.

View nimbosa's full-sized avatar

nimbosa nimbosa

View GitHub Profile
export BOXNAME=smartos01
export ISO=https://download.joyent.com/pub/iso/latest.iso
# Download iso
wget $ISO
# Create VM
VBoxManage createvm --name $BOXNAME --ostype OpenSolaris_64 --register
VBoxManage modifyvm $BOXNAME --memory 1024 --hwvirtex on --hwvirtexexcl off --nestedpaging on --largepages on --vtxvpid on --accelerate3d off --boot1 dvd --boot2 disk --acpi on
#!/usr/bin/env python
# with help and inspiration from
# * ASN1_generate_nconf(3) (specifically the SubjectPublicKeyInfo structure)
# * http://www.sysmic.org/dotclear/index.php?post/2010/03/24/Convert-keys-betweens-GnuPG%2C-OpenSsh-and-OpenSSL
# * http://blog.oddbit.com/2011/05/converting-openssh-public-keys.html
import sys
import base64
import struct
@nimbosa
nimbosa / user-data-dir-chromium.TXT
Created June 22, 2014 17:11
Project CHROMIUM / Google Chrome user data directory
Project CHROMIUM / Google Chrome:
The user data directory contains data specific to a given user.
Some examples of this type of data are: history, bookmarks, and cookies.
Note that in Windows, the profile name is included in the directory hierarchy.
Default Location
Windows XP
@nimbosa
nimbosa / one-mozilla-HG
Created July 10, 2014 08:51
unified Mercurial repository using bookmarks feature to pull Latest mozilla code
### It's possible to interact with Mozilla's multiple Mercurial repositories
### from a unified Mercurial repository using Mercurial's bookmarks feature.
### To set up a unified Mercurial repository, the first step is to create a new, empty repository:
hg init mozilla
### Next, edit the .hg/hgrc file in that repository to contain the following:
[paths]
camino = https://hg.mozilla.org/camino
central = https://hg.mozilla.org/mozilla-central
beta = https://hg.mozilla.org/releases/mozilla-beta
@nimbosa
nimbosa / Pale-Moon-sources
Created July 10, 2014 23:35
Pale Moon sources from 24.6 main to 24.7.0_beta4 vNext experimental 'sumozi' build
########
#
# https://github.com/FilipinOTech/mozilla-central.git GECKO280_2014031020_RELBRANCH ### 2014-03-10 Release 28.0
# https://github.com/FilipinOTech/mozilla-central.git GECKO2460esr_2014060920_RELBRANCH ### 2014-06-09 Release 24.6 ESR
# https://github.com/FilipinOTech/mozilla-central.git esr24 ### 2014-07-08 Develop 24.x ESR branch
#
# https://github.com/binoc-software/moonchild-central.git sumozi_master ### 2014-06-20 24.6.2 Binary OutCast 'sumozi' build
# https://github.com/binoc-software/palemoon-experimental.git vNext_base ### 2014-07-05 24.7.0_beta3 experimental'sumozi' build
#
########
@nimbosa
nimbosa / last-common-ancestor-delphiX-4.1.TXT
Last active August 29, 2015 14:04
delphiX-4.1 last common ancestor from upstream 'illumos-gate/master'
Feb 19, 2014
Basil Crow basil Merge remote-tracking branch 'illumos-gate/master' … 3911d0b
we are closer to home on 4.1 than 4.0 was..
ALL future development henceforth shall track Delphix 4.1 in addition to upstream changes and OpenIndiana illumos-gate
$ date
Sun Jul 27 08:31:56 PHT 2014
_____________________________________________
_____________________________________________
@nimbosa
nimbosa / keybase.md
Created August 2, 2017 01:24
KeyBase.io two-way proof of identity

Keybase proof

I hereby claim:

  • I am nimbosa on github.
  • I am nimbosa (https://keybase.io/nimbosa) on keybase.
  • I have a public key ASAYTI3Mt1of_6upVp_VulZgURI112am7miVR2Z6K9MzfAo

To claim this, I am signing this object:

@nimbosa
nimbosa / OneName.com-nimbosa
Created August 22, 2017 21:00
Verifying that "nimbosa.id" is my Blockstack ID.
Verifying that "nimbosa.id" is my Blockstack ID. https://onename.com/nimbosa

Previously described at: ERC20 critical problems medium article.

Description.

ERC20 is the most common Ethereum token standard. It should be noted that it is also the first Ethereum token standard as well.

It is also important that the original ERC20 proposal is a definition of token interface. EIP20 does not define a reference implementation for this token standard. Here is the OpenZeppelin implementation of ERC20 token: https://github.com/OpenZeppelin/zeppelin-solidity/tree/master/contracts/token/ERC20

ERC20 token standard implementation assumes two ways of token transfer: 1.) transfer function; and 2.) approve + transferFrom pattern.

@nimbosa
nimbosa / ZEC-ETH.md
Last active April 15, 2018 05:03 — forked from arielgabizon/gist:7e9906d3e06106cb5cfb7651a954c8b4
ZEC-ETH atomic cross-chain trading

I was reading about atomic cross-chain trading in the wiki https://en.bitcoin.it/wiki/Atomic_cross-chain_trading and think that perhaps the Zcash circuit could be used to easily get semi-private Zcash-ETH atomic cross-chain trading.

As in the wiki it would require the parties to communicate before and verify by themselves that certain things have appeared on the two chains. On the other hand, it doesn't require ETH chain to verify Zcash Proof of Work as I thought was needed. What the ETH client will need to do is verify a snark of the Zcash circuit (which was recently implemented for the C++ client as described in https://z.cash/blog/zcash-eth.html)

Semi-private means Alice will agree with Bob to exchange say 10 zec for 1 eth, and this 10 will only be known by both of them. Furthermore the address to which Bob's 10 zec note will be sent will be a z-addr known only by him and Alice.

So here's how it could work (simplified)

  1. Alice will send Bob the Eth address Addr where she wants to receive her 1 eth