Skip to content

Instantly share code, notes, and snippets.

View agrcrobles's full-sized avatar

Garcia agrcrobles

  • Barcelona
View GitHub Profile
@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";
@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 / 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"
@agrcrobles
agrcrobles / Dockerfile
Created October 15, 2017 23:58 — forked from jkinkead/Dockerfile
Naive Dockerfile
# You should always specify a full version here to ensure all of your developers
# are running the same version of Node.
FROM node:7.8.0
# The base node image sets a very verbose log level.
ENV NPM_CONFIG_LOGLEVEL warn
# Copy all local files into the image.
COPY . .
<br /><br />
# React Native: Animated
ReactEurope 2015, Paris - Spencer Ahrens - Facebook
<br /><br />
## Fluid Interactions
- People expect smooth, delightful experiences
@agrcrobles
agrcrobles / React Native: Animated - Code
Created October 5, 2017 16:01 — forked from sahrens/React Native: Animated - Code
Example code from ReactEurope 2015 talk - React Native: Animated
/**
* The examples provided by Facebook are for non-commercial testing and
* evaluation purposes only.
*
* Facebook reserves all rights not expressly granted.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
@agrcrobles
agrcrobles / blockchain.py
Created October 4, 2017 11:06 — forked from dvf/blockchain.py
Blockchain: Step 2
block = {
'index': 1,
'timestamp': 1506057125.900785,
'transactions': [
{
'sender': "8527147fe1f5426f9dd545de4b27ee00",
'recipient': "a77f5cdfa2934df3954a5c7c7da5df1f",
'amount': 5,
}
],
@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
}
})