Skip to content

Instantly share code, notes, and snippets.

View alfonsodev's full-sized avatar
🏠
Working from home

Alfonso alfonsodev

🏠
Working from home
View GitHub Profile
@alfonsodev
alfonsodev / tutorial.md
Created November 10, 2018 14:58
symfony 4 tutorial

Symfony 4 tutorial

Creating the project

Project has been created with symfony new project template

composer create-project symfony/website-skeleton demo

init repo and commit

cd demo
@alfonsodev
alfonsodev / kafka.rb
Last active August 8, 2018 14:50
Kafka 0.9
class Kafka < Formula
desc "Publish-subscribe messaging rethought as a distributed commit log"
homepage "https://kafka.apache.org/"
url "https://archive.apache.org/dist/kafka/0.9.0.0/kafka_2.11-0.9.0.0.tgz"
sha256 "6e20a86cb1c073b83cede04ddb2e92550c77ae8139c4affb5d6b2a44447a4028"
bottle do
cellar :any_skip_relocation
sha256 "67105a99b29380f4af1e124de0ce92cda4d90eeb1cac0ee4bfc7771a9b408213" => :high_sierra
sha256 "67105a99b29380f4af1e124de0ce92cda4d90eeb1cac0ee4bfc7771a9b408213" => :sierra
@alfonsodev
alfonsodev / multiple_ssh_setting.md
Created February 6, 2018 21:26 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
// Retry 5 times with waiting for 2 seconds
function* updateApi(data) {
for(let i = 0; i < 5; i++) {
try {
const apiResponse = yield call(apiRequest, { data });
return apiResponse;
} catch(err) {
if(i < 4) {
yield call(delay, 2000);
}
@alfonsodev
alfonsodev / AndroidManifest.xml
Created October 24, 2017 09:47
for react-native-firebase issue #498
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.myApp"
android:versionCode="4"
android:versionName="1.0">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
@alfonsodev
alfonsodev / action-creator-vs-reducer.md
Created October 22, 2017 11:13 — forked from kof/action-creator-vs-reducer.md
Action creator vs. reducer

When should you use action creator and when reducer?

Action creator

  • you need to have side effects
  • you need to read from store to decide what to do
  • you need to dispatch more than one action
  • action produced by action creator needs to contain all the data reducer can need to shape the components state

Reducer

  • should not have any side effects
@alfonsodev
alfonsodev / Podfile
Created October 16, 2017 12:22
Podfile for reac-native-firebase issue report
source 'https://github.com/CocoaPods/Specs.git'
project 'MyApp.xcodeproj'
platform :ios, '9.0'
plugin 'cocoapods-keys', {
:project => 'MyApp',
:keys => [
"MixPanelToken",
]
}
@alfonsodev
alfonsodev / build.gradle
Created October 12, 2017 14:31
react-native-firebase issue with react-native-navigation
apply plugin: "com.android.application"
import com.android.build.OutputFile
apply from: "../../node_modules/react-native/react.gradle"
def enableSeparateBuildPerCPUArchitecture = false
/**
@alfonsodev
alfonsodev / ethereum_tutorial.md
Created October 5, 2017 18:55
Ethereum hello world
@alfonsodev
alfonsodev / keybase.md
Created June 12, 2017 10:59
keybase.md

Keybase proof

I hereby claim:

  • I am alfonsodev on github.
  • I am alfonsodev (https://keybase.io/alfonsodev) on keybase.
  • I have a public key ASC8x5RyAQekfCjTYePcqDGs6TYrFOhZ2eXgTVhBzh9CPwo

To claim this, I am signing this object: