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
{ | |
"technology-space": { | |
"links": [ | |
"/challenge/alert-alert/", | |
"/challenge/bring-internet-deep-space-exploration/", | |
"/challenge/nasa-small-business-one-stop/", | |
"/challenge/phonesat-convert-your-smartphone-satellite/", | |
"/challenge/pilot-satellite/", | |
"/challenge/space-adventure-earth-limits-solar-system/", | |
"/challenge/space-mission-roadmap/", |
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
# gem install nokogiri | |
require 'nokogiri' | |
require 'open-uri' | |
base_uri = "https://2014.spaceappschallenge.org/" | |
category_links = Nokogiri::HTML(open("#{base_uri}/challenge")).css('#category_array a').map {|l| l.attributes['href'].text} | |
categories = category_links.map {|cat| cat.split('/').last} | |
category_hashes = {} | |
category_links.each_with_index do |link, index| |
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
# gem install httparty | |
require 'httparty' | |
module MAAS | |
class API | |
include HTTParty | |
base_uri 'http://marsweather.ingenology.com/v1' | |
def initialize(params = nil) | |
@params = params |
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
#!/usr/bin/env ruby | |
# encoding UTF-8 | |
require 'csv' | |
require 'json' | |
require 'open-uri' | |
# Check if we're working with an URL or filename | |
if ARGV[0].match(URI.regexp) | |
file = File.open(open(ARGV[0])) |
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
from flask import Flask, jsonify, request | |
from datetime import tzinfo, timedelta, datetime | |
import json | |
import ephem | |
app = Flask(__name__) | |
@app.route("/spacebody") | |
def spacebody(): |
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
// Dirty fix | Line 120 | |
<div class="container" style="width: 980px;"> | |
// CSS Fix | |
<div class="container" id="navbar"> | |
// Add rule to CSS |
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 expand() { | |
$(this).hide(); | |
var parent; | |
parent = $(this).parents(".span4"); | |
console.log(parent); | |
$(parent).contents().find("a.collapse-translation").show(); | |
$(parent).css("height", "auto"); | |
$(parent).children(".extra-content").slideDown(); | |
return false; |
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 Lesson | |
include Mongoid::Document | |
field :title, type: String | |
field :body, type: String | |
field :release_date, type: Date | |
field :pdf, type: String | |
field :image, type String | |
field :audio, type: String | |
end |
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
require 'sinatra' | |
class Car | |
def mpg | |
return "50 MPG" | |
end | |
def length | |
return "2.5 meters" | |
end |
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
#!/usr/bin/env ruby | |
# sudo port install jp2a (Mac OS X) | |
# sudo apt-get install jp2a (Ubuntu/Debian) | |
# gem install httparty | |
# gem install hashie | |
# gem install hirb | |
class Candidate | |
@@base_url = 'http://207.150.251.12/REYDI_NocheDelEvento/' |
OlderNewer