Skip to content

Instantly share code, notes, and snippets.

View mariohmol's full-sized avatar
:octocat:
lets make opensource!

Mario Mol mariohmol

:octocat:
lets make opensource!
View GitHub Profile
<!doctype html>
<meta charset="utf-8">
<script src="http://www.d3plus.org/js/d3.js"></script>
<script src="http://www.d3plus.org/js/d3plus.js"></script>
<div id="viz"></div>
<script>
<!doctype html>
<meta charset="utf-8">
<script src="http://www.d3plus.org/js/d3.js"></script>
<script src="http://www.d3plus.org/js/d3plus.js"></script>
<div id="viz"></div>
<script>
@mariohmol
mariohmol / proxy.conf
Last active February 23, 2016 12:22
Configure Apache 2.4 + AngularJS + API (Stronloop LoopBack)
<VirtualHost *:80>
CustomLog /home/myapp/logs/wsgi.log common
ErrorLog /home/myapp/logs/error.log
LogLevel info
DocumentRoot /home/myapp/myclone/client
ServerName myapp.com
RewriteEngine On
# If an existing asset or directory is requested go to it as it is
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f
@mariohmol
mariohmol / supervisord.conf
Created February 22, 2016 20:57
Supervisor conf for a node app
[supervisord]
logfile=/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10 ; (num of main logfile rotation backups;default 10)
loglevel=info ; (log level;default info; others: debug,warn,trace)
[program:myapp]
command=/usr/bin/node .
process_name=%(program_name)s
numprocs=1
@mariohmol
mariohmol / Gruntfile.js
Last active October 27, 2016 16:40
Configure Build grunt tasks for Strongloop + AngularJS + Bower modules
/*
* https://github.com/angular-fullstack/generator-angular-fullstack/blob/master/Gruntfile.js
* https://docs.strongloop.com/display/public/LB/AngularJS+Grunt+plugin
* http://amsterdam.luminis.eu/2014/12/10/improve-my-angularjs-project-with-grunt/
* https://github.com/olov/ng-annotate
* https://github.com/mgol/grunt-ng-annotate
* https://oclazyload.readme.io/docs
https://github.com/strongloop/loopback-example-offline-sync/blob/master/Gruntfile.js
@mariohmol
mariohmol / api.coursera.html
Last active July 2, 2016 02:55
How to consume Coursera API using jquery - example with courses and jsonp workaround
<html><body>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.js"></script>
<script type="text/javascript">
$(function(){
$.ajax({
type: "GET",
url: "http://cors.io/",
data: {
u: "https://api.coursera.org/api/courses.v1?q=search&query=Philosophy"
}
@mariohmol
mariohmol / gist:246eb67452e49fbebc35fd4b93098365
Last active November 29, 2016 17:23
How to use local mongo
@mariohmol
mariohmol / projecttips.md
Created March 3, 2017 18:51
Project Tips
  1. make a readme.md in the project with description, techs and a link for live (ghpges)
  2. make some comments and remove console.logs and revise the console for browser if have any errors
  3. try to make a landing page based on some ideas from https://land-book.com/gallery/landings
  4. check if have header with link and a good footer with links to the app, about you, github , twitter...
var breeds={'chiuauahua': 0, 'bull terrier': 0, 'bulldog': 0, 'boxer': 0}
var questions = [
{
question: "1. What size you like?",
answers: ["small","big"],
results: { "small":["chiuauahua",'bull terrier'] , "big": ['bulldog','boxer'] }
},
{