Skip to content

Instantly share code, notes, and snippets.

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

Douglas Correa douglascorrea

🏠
Working from home
View GitHub Profile
@douglascorrea
douglascorrea / react-no-navegador.html
Created April 8, 2021 20:51
Projetinho de Quinta - React no Navegador
<script src="https://unpkg.com/react@17/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>
<!--Nao use isso em producao: -->
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
module Components.Home.Messages exposing (..)
import Components.Signup.Messages exposing (..)
type Msg
= OpenSignupModal
| CloseSignupModal
| SignupMsg Components.Signup.Messages.Msg
@douglascorrea
douglascorrea / firebaseTransformUser.js
Created June 6, 2016 15:11
transformFirebaseUser
function transformFirebaseUser(firebaseUser) {
const storeUser = {};
const userProperties = [
'displayName',
'email',
'emailVerified',
'isAnonymous',
'photoURL',
'providerData',
@douglascorrea
douglascorrea / firebaseActions.js
Created June 4, 2016 04:46
firebase-error-solved.js6
import * as types from './actionTypes';
import {beginAjaxCall, ajaxCallError} from './ajaxStatusActions';
import FirebaseApi from '../api/mockFirebaseApi';
import * as firebase from 'firebase';
/// THIS WORKS
export function userCreatedSuccess(user) {
return {type: types.USER_CREATED_SUCCESS, user: {
email: user.email
}};
curl -L http://install.ohmyz.sh | sh
@douglascorrea
douglascorrea / install nodejs on amazon ec2.sh
Last active August 29, 2015 14:11
Installing NodeJS on EC2 instances on Amazon AWS
# Connect to EC2
ssh -i key.pem [email protected]
# Update, install the compiler and git
sudo yum update
sudo yum install gcc-c++ make
sudo yum install openssl-devel
sudo yum install git
# install nodejs
@douglascorrea
douglascorrea / app.styl
Last active October 27, 2016 18:23
Angular Directive for Particles JS - https://github.com/VincentGarreau/particles.js
.particleJs
background-color transparent
width 35%
height 100%
display block
position absolute
top 0px
left 0px
@douglascorrea
douglascorrea / passwordConfirmation.js
Last active August 29, 2015 14:05
Password Confirmation AngularJS directive
/*
How to use:
on inputs:
<input type="password" id="pw2" name="pw2"
ng-model="pw2" ng-required="" password-confirm="pw1" />
get errors with:
"myForm.pw2.$error.passwordmatch"
*/
angular.module('myApp')
.directive('passwordConfirm', [function () {
@douglascorrea
douglascorrea / install-nodejs-amazon-ec2-centos
Last active July 7, 2019 09:46
Install NodeJS on Amazon Linux EC2 (CentOS)
sudo yum install openssl openssl-devel
sudo yum groupinstall "Development Tools"
sudo yum install git-core
git clone [email protected]:nodejs/node.git
cd node
./configure
make