This file contains hidden or 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.16; | |
interface Token { | |
function transfer(address receiver, uint amount); | |
} | |
contract Crowdsale { | |
address public beneficiary; | |
uint public fundingGoal; | |
uint public amountRaised; |
This file contains hidden or 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
// reference: https://gist.github.com/ricomonster/24a18b8f01d0b44dec22e0bb29b23d3a | |
import tokenContract from 'token.js'; | |
const contract = new web3.eth.Contract(tokenContract.tokenABI); | |
contract.deploy({ | |
data: '0x' + tokenContract.tokenBytecode, | |
arguments: [form.token.supply, form.token.name, form.token.symbol] | |
}) | |
.send({ |
This file contains hidden or 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
const tokenABI = [{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_value","type":"uint256"}],"name":"bu |
This file contains hidden or 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
0x7067f0cce7fad292946bb9ed3d2a0f8afa135bce |
This file contains hidden or 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
var shortcuts = { | |
bold: 'Cmd-B', | |
italic: 'Cmd-I', | |
link: 'Cmd-K', | |
image: 'Cmd-Alt-I', | |
quote: "Cmd-'", | |
'ordered-list': 'Cmd-Alt-L', | |
'unordered-list': 'Cmd-L', | |
'undo': 'Cmd-Z', | |
'redo': 'Cmd-Y' |
This file contains hidden or 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
Vue.directive('codemirror', { | |
twoWay : true, | |
bind : function () { | |
this.codemirror = CodeMirror(this.el, { | |
mode : "markdown", | |
tabMode : "indent", | |
lineWrapping : !0 | |
}); | |
this.codemirror.on("change", function () { |
This file contains hidden or 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
sudo apt-get update | |
sudo apt-get install -y vim curl python-software-properties python g++ make | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 | |
echo "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" | tee -a /etc/apt/sources.list.d/10gen.list | |
sudo add-apt-repository ppa:tuxpoldo/phpmyadmin | |
sudo add-apt-repository ppa:ondrej/php5 | |
sudo add-apt-repository ppa:chris-lea/node.js |
This file contains hidden or 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
var gulp = require('gulp'); | |
var autoprefixer = require('gulp-autoprefixer'); | |
var minifycss = require('gulp-minify-css'); | |
var rename = require('gulp-rename'); | |
var uglify = require('gulp-uglify'); | |
// css files at lib/css/sitefunc -> public/css/sitefunc | |
gulp.task('sitefunc-css', function() { | |
return gulp.src('lib/css/sitefunc/*.css') | |
.pipe(autoprefixer([ |
This file contains hidden or 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
1. Update. | |
sudo apt-get update | |
2. Install Apache | |
sudo apt-get install apache2 | |
3. Check if Apache is running, navigate to http://localhost/ | |
4. Install PHP | |
sudo apt-get install php5 libapache2-mod-php5 |