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
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); |
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
#!/usr/bin/env bash | |
# Must be run on an Amazon Linux AMI that matches AWS Lambda's runtime | |
# As of Nov 23, 2015, this is Amazon Linux AMI 2014.09.2 x86_64 (ami-0c682c64) | |
# | |
# Lambda includes ImageMagick 6.7.8-9 preinstalled, so you need to prepend PATH | |
# with the folder containing these binaries in your Lambda function to ensure | |
# these newer binaries are used. | |
sudo yum -y install libpng-devel libjpeg-devel libtiff-devel gcc |
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
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed. | |
Compiler: CMAKE_C_COMPILER-NOTFOUND | |
Build flags: | |
Id flags: | |
The output was: | |
No such file or directory | |
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed. |
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
export ES_HOST=http://localhost:9200 | |
# Create an index we will call it users | |
curl -XPUT $ES_HOST/users | |
# Configure mapping, files with path and size | |
curl -XPUT $ES_HOST/users/files/_mapping -d ' | |
{ | |
"doc": { | |
"properties": { |
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
#Create an Index | |
curl -XPUT 'localhost:9200/files | |
#Create index mapping enabling _source and disabling _all fields | |
#Without the store property set to true, no results are returned | |
curl -XPUT /files/rawfiles/_mapping -d '{ | |
"rawfiles": { | |
"_source": { | |
"enabled": true |