Skip to content

Instantly share code, notes, and snippets.

View areebmajeed's full-sized avatar
🎯
Focusing

Areeb areebmajeed

🎯
Focusing
View GitHub Profile
@areebmajeed
areebmajeed / web3-solc-contract-compile-deploy.js
Created January 28, 2018 15:19 — forked from tomconte/web3-solc-contract-compile-deploy.js
Compiling and deploying an Ethereum Smart Contract, using solc and web3.
const fs = require('fs');
const solc = require('solc');
const Web3 = require('web3');
// Connect to local Ethereum node
const web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
// Compile the source code
const input = fs.readFileSync('Token.sol');
const output = solc.compile(input.toString(), 1);
@areebmajeed
areebmajeed / php speed up tips.html
Created January 16, 2018 07:11 — forked from bsalim/php speed up tips.html
63 Tips for speeding up PHP
<html>
<body>
<p>Here are Webber’s points:</p>
<ul>
<li>If a method can be static, declare it static. Speed improvement is by a factor of 4.</li>
<li>echo is faster than print.(<em>* compare with list from phplens by John Lim</em>)</li>
<li>Use echo’s multiple parameters instead of string concatenation.</li>
<li>Set the maxvalue for your for-loops before and not in the loop.</li>
<li>Unset your variables to free memory, especially large arrays.</li>
<li>Avoid magic like __get, __set, __autoload</li>
apt-get update;
apt-get install software-properties-common python-software-properties -y;
add-apt-repository -y ppa:webupd8team/java;
apt-get update;
apt-get -y install oracle-java8-installer;
wget https://github.com/wavesplatform/Waves/releases/download/v0.7.9/waves_0.7.9_all.deb;
dpkg -i waves*.deb;
service waves start;
#!/bin/bash
apt-get install apt-transport-https;
wget -qO - https://apt.z.cash/zcash.asc | sudo apt-key add -;
echo "deb [arch=amd64] https://apt.z.cash/ jessie main" | sudo tee /etc/apt/sources.list.d/zcash.list;
apt-get update && sudo apt-get install zcash;
@areebmajeed
areebmajeed / monero-install.sh
Last active October 22, 2017 09:49
A script to install Monero
#!/bin/bash
apt-get update;
apt-get upgrade;
apt-get install git pkg-config libboost-all-dev libevent-dev build-essential autoconf libssl-dev libboost-dev libboost-chrono-dev libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-test-dev libboost-thread-dev libtool -y;
apt-get install libdb5.3++-dev libdb5.3-dev libqrencode-dev bsdmainutils cmake libzmq-dev libzmq3-dev -y;
wget http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.8.tar.gz && tar -zxf download.php\?file\=miniupnpc-1.8.tar.gz && cd miniupnpc-1.8/;
make && make install && cd .. && rm -rf miniupnpc-1.8 download.php\?file\=miniupnpc-1.8.tar.gz;
@areebmajeed
areebmajeed / litecoin-install.sh
Created October 22, 2017 06:09
A script to install Litecoin
#!/bin/bash
apt-get update;
apt-get upgrade;
apt-get install git pkg-config libevent-dev build-essential autoconf libssl-dev libboost-dev libboost-chrono-dev libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-test-dev libboost-thread-dev libtool -y;
apt-get install libdb5.3++-dev libdb5.3-dev libqrencode-dev bsdmainutils -y;
wget http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.8.tar.gz && tar -zxf download.php\?file\=miniupnpc-1.8.tar.gz && cd miniupnpc-1.8/;
make && make install && cd .. && rm -rf miniupnpc-1.8 download.php\?file\=miniupnpc-1.8.tar.gz;
@areebmajeed
areebmajeed / nodejs.sh
Last active January 9, 2018 14:11
A script to install NodeJS
#!/bin/bash
apt-get update;
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -;
apt-get install -y nodejs;
@areebmajeed
areebmajeed / ripple-install.sh
Last active October 21, 2017 11:03
A script to install Ripple
#!/bin/bash
apt-get update;
apt-get install yum-utils alien;
rpm -Uvh https://mirrors.ripple.com/ripple-repo-el7.rpm;
yumdownloader --enablerepo=ripple-stable --releasever=el7 rippled;
rpm --import https://mirrors.ripple.com/rpm/RPM-GPG-KEY-ripple-release && rpm -K rippled*.rpm;
alien -i --scripts rippled*.rpm && rm rippled*.rpm;
systemctl enable rippled.service;
systemctl start rippled.service;
@areebmajeed
areebmajeed / ethereum-install.sh
Last active April 7, 2018 13:47
A script to install Ethereum (GETH).
#!/bin/bash
apt-get update;
apt-get install git build-essential -y;
wget https://storage.googleapis.com/golang/go1.9.2.linux-amd64.tar.gz;
tar -xvf go1.9.2.linux-amd64.tar.gz;
mv go /usr/local;
export GOROOT=/usr/local/go;
export GOPATH=$HOME/Projects/Proj1;
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH;
@areebmajeed
areebmajeed / lemp-install.sh
Last active October 19, 2017 09:26
A quick script to install PHP 7.1 with Nginx and MariaDB
#!/bin/bash
apt-get update;
apt install apt-transport-https lsb-release ca-certificates -y;
wget -O /etc/apt/trusted.gpg.d/php.gpg \
https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" |
tee /etc/apt/sources.list.d/php.list