Programming Assignment #2 CS4001301
=====================================================================
1. Scheme (50pt)
function name: inv_app
input: 2 lists, list1 and list2
This file contains hidden or 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
<link rel="import" href="../core-tooltip/core-tooltip.html"> | |
<link rel="import" href="../topeka-elements/category-images.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../core-icons/av-icons.html"> | |
<link rel="import" href="../paper-fab/paper-fab.html"> | |
<polymer-element name="my-element"> | |
<template> |
This file contains hidden or 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
<p class="user-actions"> | |
<% if current_user.blank? %> | |
<%= link_to("Sign In", new_user_session_path) %> | |
<%= link_to("Sign Up", new_user_registration_path) %> | |
<% else %> | |
Hello, <%= current_user.email %> | |
<%= link_to("Log Out", destroy_user_session_path, method: :delete) %> | |
<% end %> | |
</p> |
This file contains hidden or 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
<% flash.each do |type, message| %> | |
<p class="<%= type %>"><%= message %></p> | |
<% end %> |
This file contains hidden or 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
https://github.com/Neson/date-parser | |
https://raw.githubusercontent.com/Neson/date-parser/master/script/date-parser.min.js | |
dateParser.parse('') | |
https://github.com/karpathy/convnetjs | |
http://cs.stanford.edu/people/karpathy/convnetjs/demo/mnist.html |
This file contains hidden or 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
#!/bin/sh | |
# | |
# The script used to deploy Rails apps to AWS OpsWorks via Codeship. | |
# | |
# It requires the following environment variables to be set: | |
# | |
# - AWS_ACCESS_KEY_ID | |
# - AWS_SECRET_ACCESS_KEY | |
# - APP_NAME | |
# - S3_BUCKET |
This file contains hidden or 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
# $ curl -L http://git.io/opsru_setapp > set-app.sh | |
# $ . set-app.sh app_name | |
# | |
# cd into app directory and sets the environment variables | |
# on AWS OpsWorks Instances running Unicorn Rails App Server. | |
APP_NAME=$1 && \ | |
cd "/srv/www/${APP_NAME}/current" && \ | |
export RAILS_ENV=production && \ | |
cat "/srv/www/${APP_NAME}/shared/config/unicorn.conf" | grep ENV > "/tmp/${APP_NAME}_env" && \ |
This file contains hidden or 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
cd / | |
sudo swapon -s | |
sudo fallocate -l 2G /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
sudo swapon -s |
This file contains hidden or 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
rm -rf ~/.bundle/ ~/.gem/bundler/ ~/.gems/cache/bundler/ | |
rm -rf $GEM_HOME/bundler/ $GEM_HOME/cache/bundler/ | |
rm -rf .bundle/ | |
rm -rf vendor/cache/ | |
rvm gemset use global | |
gem uninstall rubygems-bundler open_gem | |
bundle install |
This file contains hidden or 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
# $ curl -L http://git.io/opsrp_setapp > set-app.sh | |
# $ . set-app.sh app_name | |
# | |
# cd into app directory and sets the environment variables | |
# on AWS OpsWorks Instances running Passenger Rails App Server. | |
APP_NAME=$1 && \ | |
cd "/srv/www/${APP_NAME}/current" && \ | |
export RAILS_ENV=production && \ | |
\ |