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
#!/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
//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
0x110087600cF6bdC708CBaab5F5aCF91508Ae5eC4 |
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
pragma solidity ^0.4.18; | |
/** | |
* Welcome to the Telegram chat http://www.devsolidity.io/ | |
*/ | |
/** | |
* @title SafeMath | |
* @dev Math operations with safety checks that throw on error | |
*/ |
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
<div id='body'> | |
<h1>this is a header</h1> | |
<iframe id='iframe' /> | |
</div> | |
<p id='responseText'> | |
</p> |
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
function myFunction () { | |
console.log('Executed!'); | |
var source = "https://firebasestorage.googleapis.com/v0/b/aminsbd-96be5.appspot.com/o/alarm.mp3?alt=media&token=c7597653-7d8b-44c6-9bb2-e8b9301dfe55" | |
var audio = document.createElement("audio"); | |
// | |
audio.autoplay = true; | |
// | |
audio.load() | |
audio.addEventListener("load", function() { | |
audio.play(); |
OlderNewer