Skip to content

Instantly share code, notes, and snippets.

{
"name": "voting-server",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "mocha --compilers js:babel/register --require ./test/test_helper.js --recursive",
"test:watch": "npm run test -- --watch"
},
"author": "",
import React from 'react';
import Sidebar from '../sidebar/Sidebar.jsx';
import Main from '../main/Main.jsx';
var TourGuideMixin = require('react-tour-guide').Mixin;
var tour = {
startIndex: 0,
scrollToSteps: true,
steps: [
@gregRV
gregRV / 0_reuse_code.js
Created February 4, 2014 08:38
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@gregRV
gregRV / challenge_435_bslugs
Created November 10, 2013 04:07
Feedback for Challenge 435: Calculating the Array Total Banana Slugs
Hey everyone!
=
To provide you all with further support as you work diligently on your prep material and challenges, we're going to be providing some code snippets from your cohort-mates that we feel does a good job nailing the specifics of the challenge. By no means are these the ***only*** correct answers amongst the group, just a few examples of good code that you can compare/contrast with your own.
Pseudocode
-
While pseudocoding, it's very easy to leave out pertinent information because people often make assumptions or avoid specifics until writing the real code. However, the more explicit you are in your pseudocode, the easier it will be writing the real code.
In this exercise, it was very common for people to list the INPUT as 'array', and for the context of this fairly simple exercise, that makes sense. But consider this- what ***data type(s)*** does the array contain? Integers? Floats? Strings? These examples mention that the array contains 'numbers' (close enough to Integers, for now), which is
@gregRV
gregRV / application.js
Created October 21, 2013 02:54
AJAX pairing with Ken
$(document).ready(function() {
// listen for 'edit' click, append field and button
$('ul').on('click', '.edit', function(){
$(this).closest('.container').append("<input type='text' class='new-title' placeholder='title'/><button class='submit-edit'>Submit Edit</button>");
});
$('ul').on('click', '.submit-edit', function(){
// VALUES WE PASS INTO AJAX REQUEST
var id = $(this).closest('.container').attr('val');
var new_title = $(this).closest('.container').find('.new-title').val();
@gregRV
gregRV / board.html
Created October 16, 2013 23:12
'Post-It' from Phase 3, refactored by Zee
<html>
<head>
<title>Post-It Board</title>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script>
<script src="post-it.js"></script>
<link rel="stylesheet" type="text/css" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
@gregRV
gregRV / app.html
Created August 13, 2013 01:26
Phase 3, Week 2: Grocery List
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="main.css" media="screen" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<script src="app.js"></script>
</head>
@gregRV
gregRV / app.css
Created August 3, 2013 21:48
Tic-Tac-Toe in OOJS (in progress)
#board-container {
padding: 10px;
margin: 0;
width: 490px;
border: 3px solid green;
}
ul {
padding: 0;
margin: 0;
@gregRV
gregRV / chris_irb.rb
Created August 1, 2013 00:41
Club's pretty irb ish
# require 'rubygems' #needed for wirble
require 'irb/completion' # non-wirble auto-complete
require 'pp'
require 'wirble'
begin
# init wirble
Wirble.init
Wirble.colorize
rescue LoadError => err
@gregRV
gregRV / gist:6119401
Created July 31, 2013 05:01
Completed Phase 2 Assessments
https://www.dropbox.com/sh/wf8jvcx3hyii2qu/_YoKAbBOYF/DBC/completed_p2_solos