Yours
<h5>Comments:</h5>
<% @post.comments.each do |comment| %>
<div class='well span8'>
<p>
<em><%= comment.body %></em>
</p>
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
export default class Portal extends React.Component { | |
root = null; | |
constructor(props) { | |
super(props); | |
this.el = document.createElement('div'); | |
} |
version: 2 | |
jobs: | |
test-job: | |
machine: true | |
steps: | |
- checkout | |
- run: sudo bash -c "$(curl -fsSL https://s3.amazonaws.com/tools.nanobox.io/bootstrap/ci.sh)" | |
- run: nanobox evar add local CLOUDINARY_API_KEY=$CLOUDINARY_API_KEY |
run.config: | |
extra_steps: | |
- "run locally" | |
- "run after app's runtime is built" | |
- "but before runtime is packaged for use" | |
- "Environment variables are not available during the build process." | |
- "No access to data services" | |
- "Code is fully writable" | |
require "net/http" | |
require "nokogiri" | |
unless [1, 2].include? ARGV.length | |
puts "Usage: TERM [max number of results to display]" | |
exit | |
end | |
def max_results | |
max = ARGV[1].to_i |
require 'pry' | |
# Constants | |
INITIAL_MARKER = " " | |
PLAYER_MARKER = "X" | |
COMPUTER_MARKER = "O" | |
WINNING_LINES = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] + # rows | |
[[1, 4, 7], [2, 5, 8], [3, 6, 9]] + # columns | |
[[1, 5, 9], [3, 5, 7]] # diagonals |
Yours
<h5>Comments:</h5>
<% @post.comments.each do |comment| %>
<div class='well span8'>
<p>
<em><%= comment.body %></em>
</p>
namespace :figaro do | |
desc "SCP transfer figaro configuration to the shared folder" | |
task :setup do | |
on roles(:app) do | |
upload! "config/application.yml", "#{shared_path}/config/application.yml", via: :scp | |
end | |
end | |
desc "Symlink application.yml to the release path" | |
task :symlink do |
# I wrote this script because I had a bunch of heroku apps on my account that I didn't know what | |
# local apps they matched. Just search the heroku app name and this script will find the local | |
# app for you. | |
# | |
# Feel free to use and alter this script as much as you want. | |
unless ARGV[0] | |
fail 'You pust provide repo name to search for' | |
end |
// choose a random number which is inclusively between min and max | |
chooseRandomBetween = function(min, max) { | |
var difference = Math.abs(max - min) + 1; | |
return Math.floor(Math.random() * difference) + Math.min(min, max); | |
} |