Skip to content

Instantly share code, notes, and snippets.

View mrbarbasa's full-sized avatar

Marifel Barbasa mrbarbasa

View GitHub Profile
@mrbarbasa
mrbarbasa / array_of_objects.js
Created October 17, 2014 06:21
20 arrays containing a variable number of objects
var elegant_permit = [
{
'patron': 'fund',
},
{
'patron': 'observer',
},
{
'patron': 'lift',
},
@mrbarbasa
mrbarbasa / jquery_fastenate.md
Last active August 29, 2015 14:09
jQuery Fastenate Exercise

jQuery Fastenate Exercise

  1. Make sure your fastenate project is clean and all your work has been committed. Then checkout a new branch called jquery.

  2. In index.html, rename the "Random" a tag to "Blogs", and rename the "My Boards" link to "Students".

  3. Cut all four fastenate content blocks from index.html and paste it into a temporary file for reference. Be sure to leave an empty div or section element so you can append content there instead of the body element.

  4. Create a new directory called scripts and add a new file within it called app.js. Then add a script reference to it in index.html, right before the closing body tag.

@mrbarbasa
mrbarbasa / gist:3cfe64042797514a3d6b
Created December 20, 2014 23:03
Test data for The Newsfeed Express project.
var locals = {
newsContent: [
{
"author": "Marc Canter",
"title": "The Internet Of Things Is Not A Shiny New Toy",
"body": "The Internet of Things is the latest, greatest new buzzword du jour and every major technology company, industrial manufacturer, big retailer and health industry player has declared the IoT to be the next big thing. Each of these industries sees a way of taking advantage of tiny low-power intelligent devices or sensors and they’ve baked the IoT into their future product strategies."
},
{
"author": "John Biggs",
"title": "Hands On With The Blackberry Classic",
@mrbarbasa
mrbarbasa / github_api_intro.md
Last active August 29, 2015 14:13
A simple API exercise using the GitHub API

Intro to GitHub API Exercise

  1. In your DevLeague temp directory, create a directory called github_api_intro.

  2. In github_api_intro, create the following files and directories: js/app.js, css/styles.css (optional), index.html.

  3. Create the basic HTML structure and reference the JS and CSS files in your index.html. Be sure to reference jQuery before the js/app.js file:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
@mrbarbasa
mrbarbasa / hitraffic_mock_data.js
Last active August 29, 2015 14:15
HI Traffic API mock data
var incidents = [{
id: 0,
date: 1423529023,
code: "550",
type: "MOTOR VEHICLE COLLISION",
address: "ALA MOANA & CORAL ST",
location: null,
area: "KAKAAKO",
lat: 21.297355,
lng: -157.861581
@mrbarbasa
mrbarbasa / hitraffic_mock_data_v2.json
Created February 22, 2015 05:13
Same HI Traffic API mock data in JSON format and with dates resolved
[
{
"id": 0,
"date": "2/9/2015, 2:43 PM",
"code": "550",
"type": "MOTOR VEHICLE COLLISION",
"address": "ALA MOANA & CORAL ST",
"location": null,
"area": "KAKAAKO",
"lat": 21.297355,
@mrbarbasa
mrbarbasa / QuickSort.spec.js
Created March 6, 2015 04:34
Modified QuickSort specs
var chai = require('chai');
var expect = chai.expect;
var should = chai.should();
var quicksort = require('..').Sort.quick;
describe('quicksort', function () {
it('it should sort an array with nothing in it', function () {
var array = [];
@mrbarbasa
mrbarbasa / heroku_deployment.md
Last active October 22, 2015 11:14
Jon Borgonia's Live Stream Heroku Deployment Tutorial
@mrbarbasa
mrbarbasa / functions.spec.js
Created December 1, 2015 06:19
Missing piece to get console.log to pass for js-functions
describe("Main", function() {
var sandbox;
beforeEach(function() {
// create a sandbox
sandbox = sinon.sandbox.create();
// stub some console methods
sandbox.stub(window.console, "log");
sandbox.stub(window.console, "error");
});