Skip to content

Instantly share code, notes, and snippets.

View Rafase282's full-sized avatar

Rafael Rodriguez Rafase282

View GitHub Profile
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@Rafase282
Rafase282 / test-server.js
Created August 24, 2016 00:49
MangaDB: Testing the server
/*eslint no-unused-vars: ["error", { "varsIgnorePattern": "expect" }]*/
/*global describe it */
var request = require('supertest');
var expect = require('chai').expect;
var server = require('../server.js');
server = request.agent('http://localhost:' + process.env.PORT);
describe('SAMPLE unit test', function() {
@Rafase282
Rafase282 / server.js
Created August 24, 2016 00:32
MangaDB: The server
/*eslint no-console: ["error", { allow: ["warn", "error", "log"] }] */
// server.js
'use strict';
// BASE SETUP
// =============================================================================
// call the packages we need
var express = require('express'); // call express
var app = express(); // define our app using express
@Rafase282
Rafase282 / require.js
Created August 24, 2016 00:23
Example of how to import, export, and utilize functions
// Load required packages
var User = require('../models/user');
var dbHelper = require('./dbHelper');
var jwt = require('jsonwebtoken'); // used to create, sign, and verify tokens
/*
EXPORTING FUNCTIONS
Function from the dbHelper.js file.
Saves object information to database and returns the apropiated results.
*/
@Rafase282
Rafase282 / manga.js
Last active August 23, 2016 23:36
MangaDB: Manga Schema
// ./models/manga.js
// Load required packages
var mongoose = require('mongoose');
// Define our user schema
var MangaSchema = new mongoose.Schema({
title: {
type: String, //It has to be a string
lowercase: true, // make it lowercase
trim: true, // removes trailing white spaces
@Rafase282
Rafase282 / Wiki-Forum.md
Last active July 11, 2016 01:24
Free Code Camp Forum Wiki Ideas

System Account for Wiki Owrnership

  • Have the account take onwership of all present and future wiki articles.
  • Automatically seet to watching on the topic, takin ownership does not currently set the new owner to get notifications.
  • This will allow us to have an official presence on the wiki.
  • The account should be used solely for the purpose of taking ownership of wiki articles, no replying of any kind, this is so we can easily get a dump of all wiki articles without having to go through the database.

Wiki Moderation

Moderation will be done on a as needed basis, meaning when wiki post are flagged or reported.

@Rafase282
Rafase282 / Weekly-Updates.md
Last active May 9, 2016 18:12
Format for Weekly Updates

@/all

Wiki Content Updated!

Weekly Report

Notable Changes:

  • Change with link thanks to @username
  • Change without a link thanks to @username
@Rafase282
Rafase282 / Possible Articles
Last active February 29, 2016 00:49
List of most popular answers at StackOverflow
Add `http://stackoverflow.com/questions/` before the number to generate the link.
Once you find an article that shoudl be added to the wiki then add it to https://github.com/FreeCodeCamp/wiki/issues/367 in one of the sections or create a new section if needed. Then remove it from this list.
http://stackoverflow.com/questions/11227902
15012542
2669766
388282
950146
1986909
572660