Skip to content

Instantly share code, notes, and snippets.

View agrcrobles's full-sized avatar

Garcia agrcrobles

  • Barcelona
View GitHub Profile
@agrcrobles
agrcrobles / 1_initial_migration.js
Created January 29, 2018 16:28
Deploy voting contract
var Migrations = artifacts.require('./Migrations.sol');
module.exports = function(deployer) {
deployer.deploy(Migrations, { gas: 4612388 });
};
@agrcrobles
agrcrobles / package.json
Created January 22, 2018 07:20 — forked from pelle/package.json
Uport Connect - React Native example
{
"name": "exampleapp",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node_modules/react-native/packager/packager.sh --nonPersistent",
"test": "jest",
"build-uport-connect": "node_modules/.bin/derequire node_modules/uport-connect/dist/uport-connect.js >src/vendor/uport-connect.js"
},
"dependencies": {
@agrcrobles
agrcrobles / Web3HookedWalletEthTxSubprovider.js
Created January 19, 2018 20:49
Create HookedWalletEthTx Subprovider for web3 to make it work on web
import Web3 from 'web3';
const ProviderEngine = require('web3-provider-engine');
const Web3Subprovider = require('web3-provider-engine/subproviders/web3.js');
const HookedWalletEthTxSubprovider = require('web3-provider-engine/subproviders/hooked-wallet-ethtx.js');
const PUBLIC_ACCOUNT = '0xPUBLIC_ACCOUNT_HERE';
$(".new-goods-submit-button").on('click',function(){
console.log('submitting goood');
//get hash of the good
var file_unique_hash = $("#good_file_input").data('uniquehash');
var file_name = "canoe";
var file_description = "a wooden boat";
@agrcrobles
agrcrobles / .eslintrc.js
Last active December 22, 2017 05:16
My eslintrc favourite configuration! :)
module.exports = {
parser: require.resolve("babel-eslint"),
env: {
es6: true
},
parserOptions: {
sourceType: "module",
ecmaFeatures: {
import React, { Component } from 'react'
/**
* Creates a component class that renders the given Material UI component
*
* @param MaterialUIComponent The material ui component to render
* @param mapProps A mapping of props provided by redux-form to the props the Material UI
* component needs
*/
export default function createComponent(MaterialUIComponent, mapProps) {
@agrcrobles
agrcrobles / README.md
Created December 7, 2017 21:56 — forked from pbojinov/README.md
Two way iframe communication- Check out working example here: http://pbojinov.github.io/iframe-communication/

Two way iframe communication

The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.

Parent

Send messages to iframe using iframeEl.contentWindow.postMessage Recieve messages using window.addEventListener('message')

iframe

@agrcrobles
agrcrobles / android_instructions_29.md
Last active October 22, 2023 12:09 — forked from patrickhammond/android_instructions.md
Setup Android SDK on OSX with and without the android studio

Hi, I am a fork from https://gist.github.com/patrickhammond/4ddbe49a67e5eb1b9c03.

A high level overview for what I need to do to get most of an Android environment setup and maintained on OSX higher Catalina and Big Sur with and without Android Studio been installed.

Considering the SDK is installed under /Users/<your_user>/Library/Android/sdk folder which is the Android Studio preferred SDK location, but it works fine under /usr/local/share/android-sdk as well, which is a location pretty much used on CI mostly.

Prerequisites:

https://github.com/shyiko/jabba instead ?

@agrcrobles
agrcrobles / Snacks for tgndevs.md
Last active November 1, 2017 20:12
Snacks for tgndevs

some snacks for tgndevs meetup on nov 2nd 2017

Comments and feedback welcome!

KeyboardAvoidingView

https://snack.expo.io/ryxRkwnrW

Buttons with native feedback

@agrcrobles
agrcrobles / build.gradle
Created October 16, 2017 20:03 — forked from mateoKaradza/build.gradle
Example of signingConfigs within build.gradle file
signingConfigs {
release {
if (System.getenv()["CI"]) { // CI is true when running build on CI service, such as Bitrise
storeFile file(System.getenv()["BITRISE_SOURCE_DIR"] + "/keystores/my_keystore.jks")
storePassword System.getenv()["BITRISEIO_ANDROID_KEYSTORE_PASSWORD"]
keyAlias System.getenv()["BITRISEIO_ANDROID_KEYSTORE_ALIAS"]
keyPassword System.getenv()["BITRISEIO_ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD"]
} else {
storeFile file("release.keystore")
storePassword "Password123"