Skip to content

Instantly share code, notes, and snippets.

View vishim's full-sized avatar

Vishal vishim

  • London, UK
View GitHub Profile
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
export function doFacebookLogin() {
return (dispatch) => {
dispatch({ type: FACEBOOK_LOGIN })
LoginManager.logInWithReadPermissions(['public_profile', 'email', 'user_friends']).then(
function (result) {
if (result.isCancelled) {
dispatch({ type: FACEBOOK_LOGIN_FAILURE, payload: 'Login Cancelled'})
} else {
LoginManager.logInWithPublishPermissions(['publish_actions']).then(
AccessToken.getCurrentAccessToken().then(
var _ = require('underscore');
var Checkout = function (codesArr, priceObj) {
var totalObj = {};
var countObj = {}
//TODO: Check that the passed in array and price structures are ok
//Count number of each items
_.each(codesArr, function(currentItem) {
countObj[currentItem] = (countObj[currentItem] || 0) + 1;
@vishim
vishim / blog_.gitignore
Created May 2, 2015 17:44
Creating a blog using ruby on rails This is part of the 12 week full stacktraining I am taking at codermanual.com
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'
# Ignore bundler config.
/.bundle
# Ignore the default SQLite database.
#This is in client/client.js
Template.userNav.helpers({
isLoggedIn: function(){
return Meteor.userId();
},
fullName : function() {
return Meteor.user().profile.fullName;
},
});