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 / ethereum_tutorial.md
Created October 5, 2017 18:55
Ethereum hello world

This is my response to an email asking about Domain-Driven Design in golang project.

Thank you for getting in touch. Below you will find my thoughts on how golang works with DDD, changing it. This is merely a perception of how things worked out for us in a single project.

That project has a relatively well-known domain. My colleagues on this project are very knowledgeable, thoughtful and invested in quality design. The story spelled out below is a result of countless hours spent discussing and refining the approach.

Conclusions could be very different, if there was a different project, team or a story-teller.

Short story

@alfonsodev
alfonsodev / refactoring-react-views.md
Last active July 11, 2017 10:48
Refactoring React Views, checkpoints

Refactoring view general checkpints

1. Insert // @flow

in the header of the file, in this way the flowtype binary will not ignore the file, and will statically analise it.

2. Add props types to you view.

Proptypes is deprecated in react-native, the way Facebook team is going forward is using flowtype. To specify the types of properties

@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:

@alfonsodev
alfonsodev / gist:534630b8c3ba3cd267574592654b5d15
Last active April 12, 2017 20:42
configure gitlab deploy vm on vultr
@alfonsodev
alfonsodev / xdebug.md
Last active March 7, 2017 03:44
Setting up xdebug in ubuntu phpstorm

Setting up xdebug (ubuntu) and Phpstorm

sudo pecl install xdebug
sudo touch /etc/php5/mods-available/xdebug.ini
edit /etc/php5/mods-available/xdebug.ini and paste this content in to the file:

zend_extension=/usr/lib/php5/20100525/xdebug.so
xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.show_local_vars=0
@alfonsodev
alfonsodev / README.md
Last active February 7, 2017 14:30
javascript babel-webpack latest basic boilerplate

Basic manual babel latests + webpack boilerplate.

npm init -y

Install npm modules

npm install --save-dev babel babel-core babel-loader babel-preset-latest-node6 json-loader webpack 

copy the webpack.config.js file to your project.

The webpack.config.js is in this same gist.

@alfonsodev
alfonsodev / gist:10597209
Created April 13, 2014 18:56
gandi.net ssl https
Gandi.net ssl certificate working with haproxy
In one file concatenate the certifcate with the private key (domain.pem in the example)
In other file just the intermediate ceritificate (gandi.ca.pem in the example) then in your haproxy.cfg
bind *:443 ssl crt /home/.ssh/domain.pem ca-file /home/.ssh/gandi.ca.pem
frontend https-in
bind *:443 ssl crt /home/.ssh/domain.pem ca-file /home/.ssh/gandi.ca.pem
timeout client 1h
@alfonsodev
alfonsodev / Makefile
Created January 12, 2014 00:07
example Makefile of a Node.js project to create code coverage reports mocha, instanbul, coveralls
#!/bin/bash
MOCHA=node_modules/.bin/mocha
ISTANBUL=node_modules/.bin/istanbul
COVERALLS=node_modules/coveralls/bin/coveralls.js
# test files must start with "test*.js"
TESTS=$(shell find test/ -name "test*.js" -not -path "*service/*")
SERVICETEST=$(shell find test/service/ -name "test*.js" )
test:
$(MOCHA) -R spec $(TESTS)
test-service:
body {
padding-top: 120px;
padding-bottom: 40px;
background-color: #eee;
}
.container {
width: 50%;
}
.btn
{