Skip to content

Instantly share code, notes, and snippets.

View ifalldev's full-sized avatar

Caio Batista ifalldev

View GitHub Profile
@ifalldev
ifalldev / gitExemple.sh
Created February 7, 2017 14:15
Clone repo, create branch & push to new branch
$ git clone https://github.com/user/repo.git
$ cd repo
$ git checkout -b nomeDaBranch
$ git branch
...
...
$ git status
$ git commit -a -m 'Close #12 ...'
$ git push origin nomeDaBranch
@ifalldev
ifalldev / router.js
Last active March 12, 2017 15:50
Template get URL parameters
group = FlowRouter.group({name: 'group'});
group.route('/foo/:id', {
name: 'foo',
action() {
BlazeLayout.render('_defaultLayout');
},
});
@ifalldev
ifalldev / firebase.js
Created February 7, 2017 10:01
FIrebase commun uses
import firebase from 'firebase';
//INITIALIZE FIREBASE
firebase.initializeApp({
apiKey: 'AasdASiaoiAS8&AASLCKdi0aW',
authDomain: 'teste-23o45.firebaseapp.com',
databaseURL: 'https://teste-23o45.firebaseio.com',
storageBucket: 'teste-23o45.appspot.com',
messagingSenderId: '347697078956'
});
// VERIFY USER STATE; LOGGED IN OR NOT
@ifalldev
ifalldev / reduxExemple.js
Last active March 12, 2017 15:47
Redux exemple
// CREATE A REDUCER WITH SOME AMOUNT OF STATE
const reducer = (state = [], action) => {
if (action.type === 'split_string') {
return action.payload.split('');
} else if (action.type === 'add_character') {
return [ ...state, action.payload ];
}
return state;
};
@ifalldev
ifalldev / usingTaggd.js
Last active February 7, 2017 10:02
using Taggd
//ADICIONANDO UMA TAG COM TAGGD
const img = document.querySelector('#img');
const taggd = new Taggd(img);
const tag = new Taggd.Tag({x: 0.27344, y: 0.67821}, 'new');
taggd.addTag(tag);