This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
null, | |
null, | |
null, | |
null, | |
null, | |
null, | |
null, | |
null, | |
null, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
import { AngularFireDatabaseModule, AngularFireDatabase, FirebaseListObservable } from 'angularfire2/database'; | |
import { AngularFireAuth } from 'angularfire2/auth'; | |
import { Router } from "@angular/router"; | |
import * as firebase from 'firebase'; | |
@Injectable() | |
export class AuthService { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<svg width="960" height="600"></svg> | |
<script src="https://d3js.org/d3.v4.min.js"></script> | |
<script src="https://d3js.org/topojson.v2.min.js"></script> | |
<script> | |
var svg = d3.select("svg"); | |
d3.json("https://d3js.org/us-10m.v1.json", function(error, us) { | |
if (error) throw error; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp') | |
var browserify = require('browserify') | |
var watchify = require('watchify') | |
var babelify = require('babelify') | |
var source = require('vinyl-source-stream') | |
var buffer = require('vinyl-buffer') | |
var merge = require('utils-merge') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fizzBuzz(num) { | |
return (num % 3 * num % 5 == 0) ? (num % 3 == 0 ? "fizz" : "") + (num % 5 == 0 ? "buzz" : "") : num; | |
} | |
for(i = 1; i < 101; i++){ | |
var y = fizzBuzz(i); | |
$("#result").append('<p>'+y+'</p>'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
response = requests.get('http://api.wmata.com/StationPrediction.svc/json/GetPrediction/B06,E06?api_key=kfgpmgvfgacx98de9q3xazww') | |
assert response.status_code == 200 | |
data = response.json() | |
for prediction in data['Trains']: | |
print 'Line:{} | Destination: {} | Time: {} Minutes'.format(prediction['Line'], prediction['DestinationName'], prediction['Min']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Skills | |
def development_skills | |
{ | |
programming_languages: %w(Ruby PHP), | |
frameworks: %w(Rails Sinatra), | |
testing: %w(RSpec FactoryGirl Cucumber), | |
front_end: %w(Javascript AngularJS SCSS), | |
content_management: %(WordPress) | |
version_control: %w(Git) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.bar { | |
fill: black; | |
} | |
.bar:hover{ | |
fill: firebrick; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# check if 'num' is divisble by either 3 or 5. If true, check if divisible by 3 - | |
# print 'fizz' or if false ''. Same with 5, but print 'buzz'. Came up with the idea when fiddling around | |
# and had "num%3 * num%5 == 0 ? 'fizz' + 'buzz' : num". I believe it works just like concatenating a string | |
# Essentially, I believe that is what is going on, this is merely concatenating strings whichis why the '+' | |
# works to connect the two conditions; i.e., really connecting two strings. | |
def fizzbuzz(num) | |
num % 3 * num % 5 == 0 ? ( num % 3 == 0 ? "fizz" : "" ) + ( num % 5 == 0 ? "buzz" : "" ) : num | |
# num % 3 == 0 && num % 5 == 0 ? "fizzbuzz" : num % 3 == 0 ? "fizz" : num % 5 == 0 ? "buzz" : num | |
end |
NewerOlder