Skip to content

Instantly share code, notes, and snippets.

View andresaaap's full-sized avatar

Alvaro Andres Pinzon Cortes andresaaap

View GitHub Profile
{
"scheme": "g16",
"curve": "bn128",
"proof": {
"a": [
"0x268cebb48f8466a4ea19f4acb4db8e533f9803a95cb10ef1168e667c59859dc6",
"0x13628af5e2b9004b044b1045484feba0dcbd131129209dfb50716f06c83ed33b"
],
"b": [
[
@andresaaap
andresaaap / square.code
Created July 18, 2022 12:22
Creating simple zero-knowledge verifier contract with ZoKrates (0.5.0) solidity (0.5.0)
def main(private field a, field b) -> (field):
field result = if a * a == b then 1 else 0 fi
return result
{
"name": "flightsurety",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@babel/cli": {
"version": "7.2.3",
"resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.2.3.tgz",
"integrity": "sha512-bfna97nmJV6nDJhXNPeEfxyMjWnt6+IjUAaDPiYRTBlm8L41n8nvw6UAqUCbvpFfU246gHPxW7sfWwqtF4FcYA==",
require=function(){return function t(e,r,n){function o(a,s){if(!r[a]){if(!e[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var f=r[a]={exports:{}};e[a][0].call(f.exports,function(t){var r=e[a][1][t];return o(r||t)},f,f.exports,t,e,r,n)}return r[a].exports}for(var i="function"==typeof require&&require,a=0;a<n.length;a++)o(n[a]);return o}}()({1:[function(t,e,r){e.exports=[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"name",outputs:[{name:"o_name",type:"bytes32"}],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"owner",outputs:[{name:"",type:"address"}],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"content",outputs:[{name:"",type:"bytes32"}],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"addr",outputs:[{name:"",type:"address"}],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"}],n
@andresaaap
andresaaap / gist:8ed77882a81ef2e071b807eea9c0ddbb
Created May 13, 2021 03:15
Error log - IntelliJ error: invalid target release: 14
/Users/alvaroandrespinzoncortes/Library/Java/JavaVirtualMachines/corretto-11.0.11/Contents/Home/bin/java -Dmaven.multiModuleProjectDirectory=/Users/alvaroandrespinzoncortes/Documents/Udacity/Mentor/Java programming/Udasecurity/nd079-c3-java-application-deployment-projectstarter/starter/catpoint-parent -Dmaven.home=/Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven3 -Dclassworlds.conf=/Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven3/bin/m2.conf -Dmaven.ext.class.path=/Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven-event-listener.jar -javaagent:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar=62224:/Applications/IntelliJ IDEA CE.app/Contents/bin -Dfile.encoding=UTF-8 -classpath /Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds.license:/Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds-2.6.0.jar org.codehaus.classworlds.Launcher -Didea.version=2021.1.1 -e packag
pragma solidity ^0.5.0;
import 'openzeppelin-solidity/contracts/utils/Address.sol';
import 'openzeppelin-solidity/contracts/drafts/Counters.sol';
import 'openzeppelin-solidity/contracts/math/SafeMath.sol';
import 'openzeppelin-solidity/contracts/token/ERC721/IERC721Receiver.sol';
import "./Oraclize.sol";
contract Ownable {
// TODO's
@andresaaap
andresaaap / script.yml
Last active March 30, 2020 16:16
UserDate for Udacity Cloud DevOps Deploy a high-availability web app using CloudFormation Project
UserData:
Fn::Base64: !Sub |
#!/bin/bash -xe
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
apt update -y
apt install -y apache2
systemctl start apache2
systemctl enable apache2
rm ../../var/www/html/index.html
wget -P ../../var/www/html https://s3.us-east-2.amazonaws.com/test-udagram-1/index.html
@andresaaap
andresaaap / button-round-boarder-blue-shadow.component.html
Created June 18, 2019 16:34
Create button component with text set by parameter | Angular
<button class="button--color-blue">
<div><span>{{title}}</span></div>
</button>
@andresaaap
andresaaap / config.yml
Created June 17, 2019 19:01
Operationalize a Machine Learning Microservice, CircleCI
# Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2
jobs:
build:
docker:
# Use the same Docker base as the project
- image: python:3.7.3-stretch
@andresaaap
andresaaap / truffle.js
Created March 27, 2019 18:41
Example of a correct configuration of a provider to the Rinkeby Testnet
const HDWalletProvider = require("truffle-hdwallet-provider");
module.exports = {
networks: {
development: {
host: "127.0.0.1",
port: 8545,
network_id: "*" // Match any network id
},
rinkeby: {