Skip to content

Instantly share code, notes, and snippets.

View PrincessEve's full-sized avatar

Princess Eve PrincessEve

View GitHub Profile
# Update & Upgrade the System
sudo apt-get update
sudo apt-get upgrade
# Install dependencies there might be more based on your system
# However below instructions are for the fresh Ubuntu install/server
# Please carefully watch the logs because if something could not be install
# You have to make sure it is installed properly by trying the command or that particular
# dependency again
@PrincessEve
PrincessEve / Compile_Bitcoin_on_Ubuntu_14_04
Created February 6, 2018 02:25 — forked from kostaz/Compile_Bitcoin_on_Ubuntu_14_04
Compile Bitcoin on Ubuntu 14.04
Assuming the username of the Ubuntu user is "theusername".
Preparation
-----------
```
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev
@PrincessEve
PrincessEve / generate-pushid.js
Created January 29, 2018 09:02 — forked from mikelehen/generate-pushid.js
JavaScript code for generating Firebase Push IDs
/**
* Fancy ID generator that creates 20-character string identifiers with the following properties:
*
* 1. They're based on timestamp so that they sort *after* any existing ids.
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs.
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly).
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the
* latter ones will sort after the former ones. We do this by using the previous random bits
* but "incrementing" them by 1 (only in the case of a timestamp collision).
*/
@PrincessEve
PrincessEve / for-in-loop.txt
Last active January 25, 2018 02:51
javascript for-in loop for debugging
# we can debug event object by
for (var property in event) {
console.log(property + "=" + event[property]);
}