This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//credits: http://stackoverflow.com/questions/2573521/how-do-i-output-an-iso-8601-formatted-string-in-javascript | |
// params: d - a javascript Date object | |
// example: sTimestamp = ISODateString(new Date) | |
function ISODateString(d) { | |
function pad(n) { | |
return n < 10 ? '0' + n : n; | |
} | |
return d.getUTCFullYear() + '-' | |
+ pad(d.getUTCMonth() + 1) + '-' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//credits zzzzBov http://stackoverflow.com/questions/7918868/how-to-escape-xml-entities-in-javascript | |
if (!String.prototype.encodeHTML) { | |
String.prototype.encodeHTML = function () { | |
return this.replace(/&/g, '&') | |
.replace(/</g, '<') | |
.replace(/>/g, '>') | |
.replace(/"/g, '"') | |
.replace(/'/g, '''); | |
}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## put this into your ~/.bashrc file and make random passwords as needed. | |
## | |
## usage: | |
## mkpw <length> | |
## | |
## ex: for for i in $(seq 5);do mkpw 10 ; done | |
## Rw3QPaeUM2 | |
## qPgQnx5K38 | |
## wZnOZjQsdN | |
## H0tcr1tVrQ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# convertWebVTT | |
# | |
# This is a very basic and incomplete WebVTT to SRT converter. | |
# It does not parse or understand the WebVTT elements NOTE, STYLE, REGION or any C-style comments in the WebVTT file. | |
# | |
# Save this file to your desktop as ConvertWebVTT.ps1 | |
# | |
# Then create a shortcut for powershell to execute this file (change your username) | |
# C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noprofile -noexit -ExecutionPolicy ByPass -file C:\Users\brian\Desktop\ConvertWebVTT.ps1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!Array.isArray) { | |
Array.isArray = function(arg) { | |
return Object.prototype.toString.call(arg) === '[object Array]'; | |
}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# building bitcoin (for 0.13) | |
sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils | |
sudo apt-get install libboost-system-dev libboost-filesystem-dev libboost-chrono-dev | |
sudo apt-get install libboost-program-options-dev libboost-test-dev libboost-thread-dev | |
sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools | |
sudo apt-get install libprotobuf-dev protobuf-compiler libminiupnpc-dev libzmq3-dev libdb++-dev | |
sudo apt-get install git emacs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/main.cpp b/src/main.cpp | |
index 37ad1db..905a14d 100644 | |
--- a/src/main.cpp | |
+++ b/src/main.cpp | |
@@ -2951,6 +2951,42 @@ bool InitBlockIndex() { | |
printf("Got: block.GetHash() = %s\n", hash.ToString().c_str()); | |
printf("Got: block.hashMerkleRoot = %s\n", block.hashMerkleRoot.ToString().c_str()); | |
+ // BEGIN MINING THE GENESISBLOCK | |
+ // If genesis block hash does not match, then generate new genesis hash. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################################### | |
# pathname tilde expansion | |
# supports ~ ~/path and ~user only | |
# ~+ ~- and digits are not supported and | |
# doesn't make sense in a script anyways | |
# Author: Brian A. Onn | |
# Date: Mon 1 May 2017 06:06:43 UTC | |
######################################### | |
expandpath () { | |
local path="$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0x110087600cF6bdC708CBaab5F5aCF91508Ae5eC4 |
OlderNewer