Skip to content

Instantly share code, notes, and snippets.

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

John Paul JohnProg

🏠
Working from home
  • Lima, Perú
View GitHub Profile
@JohnProg
JohnProg / Install Cordova on Mac
Created October 19, 2013 18:15
Instalación y creación de Cordova un proyecto en Mac
sudo npm install -g cordova
cordova create YourNameHere com.example.YourNameHere YourNameHere
cd hello
cordova platform add ios
// si deseas trabajar con otras plataforma solo agrega:
cordova platform add android // no olvidar instalar sdk android antes.
cordova platform add blackberry10
//
Finalmente:
@JohnProg
JohnProg / Install MongoDB
Last active March 23, 2016 14:16
Install MongoDB
MAC OS:
brew install mongodb
brew services [ start | stop | restart ] mongodb
LINUX (BASADOS EN DEBIAN):
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update
sudo apt-get install mongodb-10gen
sudo service mongodb [ start | stop | restart | status ]
@JohnProg
JohnProg / rvm-rails
Last active March 23, 2016 14:17
rvm- rails
#############################################
heroku
#############################################
heroku login
heroku create
git push heroku master
-migrate bd to production
heroku run rake db:migrate
- Install
sudo npm install -g yo grunt-cli bower karma
sudo npm install -g generator-angular generator-karma
- Create the project
mkdir my_app_angular && cd $_
yo angular
- Run server
grunt serve

Getting started with Flask-Login

Pre-requisites

  • Flask pip install flask
  • Flask-Login pip install flask-login

Steps

  • Create your user model class: User. This would be a class that stores information about your User. Essentially the user_name, user_id, email, etc.
$ heroku login
$ heroku create myapp
// modify in Gruntfile.js change the tasks in the list to your production tasks
grunt.registerTask('heroku',
['compass:dist', 'autoprefixer', 'imagemin']);
touch app.js
nano app.js
//write this
var express = require('express');
var port = process.env.PORT || 3000;
@JohnProg
JohnProg / install chrome on ubuntu 14.04
Created May 5, 2014 14:11
install chrome on ubuntu 14.04
http://www.howopensource.com/2011/10/install-google-chrome-in-ubuntu-11-10-11-04-10-10-10-04/
@JohnProg
JohnProg / app.js
Created August 21, 2014 03:03 — forked from jgoux/app.js
angular.module('myApp', ['ionic', 'myApp.services', 'myApp.controllers'])
.run(function(DB) {
DB.init();
});
# move head to specific branch/commit
git checkout -b new_branch 6e559cb
# config name email
# locally
git config user.email 'email@gmail.com'
git config user.name 'Chris'
# global
git config --global user.email 'email@gmail.com'
@JohnProg
JohnProg / app.go
Last active August 29, 2015 14:11 — forked from Bochenski/app.go
package main
import (
"github.com/codegangsta/negroni"
"github.com/gorilla/context"
"github.com/unrolled/render"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
"log"
"net/http"