Skip to content

Instantly share code, notes, and snippets.

View agrcrobles's full-sized avatar

Garcia agrcrobles

  • Barcelona
View GitHub Profile
@agrcrobles
agrcrobles / README.md
Created October 29, 2018 11:16
express simple server

Simple Server in Express

  1. Fix the route when necessary

  2. Run

npm init
yarn add express
node index.js
@agrcrobles
agrcrobles / aspnetcore.development.dockerfile
Last active August 18, 2018 04:52
aspnetcore.dockerfile
FROM microsoft/dotnet:sdk
LABEL author="Dan Wahlin"
ENV DOTNET_USE_POLLING_FILE_WATCHER=1
ENV ASPNETCORE_URLS=http://*:5000
EXPOSE 5000
@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';
@agrcrobles
agrcrobles / redux-light-example.js
Created September 10, 2017 19:20 — forked from bloodyowl/redux-light-example.js
redux in 14 lines of code
const store = createStore((state = { counter: 0 }, action) => {
switch(action.type) {
case "INCREMENT":
return { counter: state.counter + 1 }
case "DECREMENT":
return { counter: state.counter - 1 }
default:
return state
}
})
package com.hellohybrid;
/**
* Created by zetta on 2/1/17.
*/
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.ReactPackage;
import Contract from 'truffle-contract';
import VotingArtifact from '../build/contracts/Voting.json';
import Web3 from 'web3';
function Star(candidate) {
const Voting = Contract(VotingArtifact);
var web3Provided;
@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": {
$(".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";
.service('AdminPlantsDevicesCtrlInit', [
// Dependencias
'$q',
'$route',
'Plant',
'Notify',
function($q, $route, Plant, Notify) {
return {
prepare: function() {
var
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Echk.Web.Mvc
{
/// <summary>
/// ale's approach
/// </summary>