Skip to content

Instantly share code, notes, and snippets.

# 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
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
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
@brandoncc
brandoncc / config.yml
Last active October 26, 2018 17:47
nanobox circleci config
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 'authorizenet'
class PaymentAuthorization
attr_reader :response
def initialize(response)
@response = response
end
def successful?
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');
}
import React from 'react';
export default function Article () {
return (
<div>
<div id="portal-root" />
<h1>Here is a latin article</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
import React from "react";
import ReactDOM from "react-dom";
import Article from "./Article";
import FlashMessage from "./FlashMessage";
import "./styles.css";
function App() {
return (
import React from "react";
import Portal from "./Portal";
export default function FlashMessage() {
return (
<Portal>
<div class="alert alert-primary" role="alert">
This is a special announcement, be sure and read it!
</div>