Skip to content

Instantly share code, notes, and snippets.

View redserpent7's full-sized avatar

Zaid Amir redserpent7

View GitHub Profile
@redserpent7
redserpent7 / web3-solc-contract-compile-deploy.js
Created February 25, 2018 19:20 — 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);
@redserpent7
redserpent7 / imagemagick.bash
Created December 5, 2017 13:42 — forked from bensie/imagemagick.bash
ImageMagick Static Binaries for AWS Lambda
#!/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