sudo apt install -y ruby ruby-dev ruby-colorize
sudo apt-get install -y libncurses5-dev libtinfo-dev
sudo gem install colorls
colorls -r
// Hex to Base64 | |
function hexToBase64(str) { | |
return btoa(String.fromCharCode.apply(null, | |
str.replace(/\r|\n/g, "").replace(/([\da-fA-F]{2}) ?/g, "0x$1 ").replace(/ +$/, "").split(" ")) | |
); | |
} | |
// Base64 to Hex | |
function base64ToHex(str) { | |
for (var i = 0, bin = atob(str.replace(/[ \r\n]+$/, "")), hex = []; i < bin.length; ++i) { |
import hashlib as hasher | |
import datetime as date | |
# Define what a Snakecoin block is | |
class Block: | |
def __init__(self, index, timestamp, data, previous_hash): | |
self.index = index | |
self.timestamp = timestamp | |
self.data = data | |
self.previous_hash = previous_hash |
sudo apt install -y ruby ruby-dev ruby-colorize
sudo apt-get install -y libncurses5-dev libtinfo-dev
sudo gem install colorls
colorls -r
1.) Download a Nerd Font
2.) Unzip and copy to ~/.fonts
3.) Run the command fc-cache -fv
to manually rebuild the font cache
ec2-54-152-134-146.compute-1.amazonaws.com.
First install Brew on your MAC
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew tap homebrew/dupes
brew tap homebrew/php
brew install php70
mcrypt
: brew install mcrypt php70-mcrypt
brew install composer
# 1. Install brew --> http://brew.sh/ | |
# 2. run the following commands in your Terminal | |
brew tap homebrew/dupes | |
brew tap homebrew/versions | |
brew tap homebrew/homebrew-php | |
brew install --with-openssl curl | |
brew install --with-homebrew-curl --with-apache php71 | |
brew install php71-mcrypt php71-imagick | |
# 3. Follow these instructions to make Apache and php-cli use the newer php executable and make the change persist after reboot. | |
brew info php71 |
/* The solution found here: http://www.aspsnippets.com/Articles/Change-URL-in-Browser-Address-Bar-without-reloading-using-JavaScript-and-jQuery.aspx */ | |
/** HTML5 History pushState method | |
* The pushState method works similar to window.location but it does not refresh or reload the page and it will modify the URL even if the page does not exists. The pushState method actually inserts an entry into the history of the browsers which allows us to go back and forth using the browser’s forward and back buttons. | |
* The pushState method accepts the following three parameters. | |
* 1. State object: - The state object is a JavaScript object which can contain any details about the page and must be serializable. | |
* 2. Title: - The title of the page. | |
* 3. URL – The URL of the page. | |
*/ |
{ | |
"name": "My Progressive Web Application", | |
"short_name": "Progressive", | |
"start_url": "/?home=true", | |
"icons": [ | |
{ | |
"src": "/icons/icon36.png", | |
"sizes": "36x36", | |
"type": "image/png" | |
}, |