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
vr = Program.create!({ | |
name: "Virtual Reality Course", | |
description: "Design and build your own world. Learn the foundations of 3D modeling, scene building, animation, and coding in VR. Topics include Unity, object-oriented programming, 3D scene composition, 3D interactions, the Unity Asset Store, and more. ", | |
program_type: :course, | |
status: :active, | |
}) | |
period = Period.current.order(:start_date).second | |
Session.create!({ |
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
# heroku run rails c -a ixjourney | tee file_to_export_to.csv | |
require 'csv' | |
ActiveRecord::Base.logger.level = 1 | |
puts; puts; | |
puts "iX ID, first name, last name, email, phone, current city, university, graduation year, facebook, signed up at, state, references" | |
csv_string = CSV.generate do |csv| | |
User.applicants.includes(:university, { referred_by_references: :linkable }).order(:created_at).each do |applicant| | |
state = if applicant.applicant_valid_as?(User::AsInterviewedApplicant) |
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
# Indented fields are self-explanatory; we have to decide what to do about non-indented fields. | |
t.integer "university_id" | |
t.string "first_name" | |
t.string "last_name" | |
t.string "graduation_year" | |
t.date "birthday" | |
t.string "major" | |
t.string "gender" | |
t.string "home_city" | |
t.string "current_city" |
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 app = angular.module("myApp", ["ngRoute", "firebase"]); // <-- angularfire | |
app.config(function($routeProvider) { | |
$routeProvider.when("/", { | |
controller: "HomeCtrl", | |
templateUrl: "/templates/home.html", | |
}).when("/signup", { | |
controller: "SignupCtrl", | |
templateUrl: "/templates/signup.html", | |
}); |
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
<div class="container"> | |
<div class="row"> | |
<div class="col-md-4 col-md-offset-4"> | |
<h1>HELLOOO!!</h1> | |
<form ng-submit="signUpWithEmail()"> | |
<input type="email" ng-model="newUser.email" class="form-control"> | |
<input type="password" ng-model="newUser.password" class="form-control"> | |
<input type="submit" value="Sign up!" class="btn btn-danger"> | |
</form> | |
<div class="btn btn-info btn-block" ng-click="signInWithFacebook()">Sign in with FB whatup</div> |
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> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Happy stuff</title> | |
</head> | |
<!-- camelCase --> | |
<!-- this_is_snake_case --> | |
<!-- this-is-kebeb-case --> | |
<!-- THIS_IS_SCREAMING_SNAKE_CASE --> |
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
<div class="container"> | |
<div class="row"> | |
<div class="col-md-4 col-md-offset-4"> | |
<h1>My happy stuff</h1> | |
<!-- {{posts}} --> | |
<ol> | |
<li ng-repeat="post in posts"> | |
<a href="http://reddit.com/{{post.data.permalink}}">{{post.data.title}}</a> | |
</li> | |
</ol> |
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 app = angular.module("myApp", ["ngRoute"]); | |
app.config(function($routeProvider) { | |
$routeProvider.when("/", { | |
controller: "HomeCtrl", | |
templateUrl: "/templates/home.html", | |
}); | |
}); | |
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/python | |
# For hackerrank.com/challenges/markov-snakes-and-ladders | |
# Uses a simulation. Other possible solutions could use probabilities simply | |
# compute the answer. | |
import fileinput | |
from random import random | |
class Board: | |
def __init__(self, slides): |
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> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>My Title</title> | |
<!-- Favicon icon --> | |
<link rel="shortcut icon" type="image/x-icon" href="./images/zebracon.jpg"> | |
<!-- Including Twitter Bootstrap for easier styling. |
NewerOlder