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 express = require('express') | |
var path = require('path') | |
var serveStatic = require('serve-static') | |
// var helmet = require('helmet') | |
var app = express() | |
// Middleware | |
// app.use(helmet()) | |
app.use("/", serveStatic(path.join(__dirname, '/dist'))) |
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 2 columns, instead of 1. in line 7.
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
Value,Description | |
animation-name,This is the name of the keyframe you want to bind to the selector. Keep an eye on this one when you read the keyframes section below. | |
animation-duration,The length of animation in seconds or milliseconds. Note: Always specify the animation-duration property. Otherwise the duration is 0 and will never be played. | |
animation-timing-function,"The speed curve of the animation. Eg: linear, ease, ease-in, ease-out, ease-in-out, step-start, step-end, steps(int,start|end), cubic-bezier(n,n,n,n), initial, inherit" | |
animation-delay,"Defined in seconds (s) or milliseconds (ms), it’s the length of a delay before the animation will start. Note: If given a negative value, it will start playing as if it had been playing for a given amount of time." | |
animation-iteration-count,The number of times an animation should be played. Eg: any numerical number | |
animation-direction,"Play the animation in reverse or alternate cycles. Eg: normal, reverse, alternate, alternate-reverse, initial, inherit" | |
animati |
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
Rails.application.routes.draw do | |
root 'parallel#parallelrate' | |
get '/bdcrate' => 'bdc#bdcrate' | |
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
<div class="entry"> | |
<h3 class="h3">How much a dollar really cost?</h3> | |
<h3 class="h3">BDC Rates</h3> | |
<div class="outer"> | |
<p>N<span id="dollar"><%= @formattedrate %></span></p> | |
</div> | |
</div> | |
<p class="left"><a href="/">Parallel Rates</a></p> | |
<p class="source">Scraped from <a target="_blank" href="http://abokifx.com">abokifx.com</a></p> |
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="entry"> | |
<h3 class="h3">How much a dollar really cost?</h3> | |
<div class="outer"> | |
<p>N<span id="dollar"><%= @formattedrate %></span></p> | |
</div> | |
</div> | |
<p class="left"><a href="bdcrate">BDC Rates</a></p> | |
<p class="source">Scraped from <a target="_blank" href="http://abokifx.com">abokifx.com</a></p> |
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
body { | |
background: green; | |
color: white; | |
font-size: 62.5%; | |
} | |
.entry { | |
position: absolute; | |
top: 50%; | |
left: 50%; |
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 BdcController < ApplicationController | |
def bdcrate | |
require 'openssl' | |
doc = Nokogiri::HTML(open('https://www.abokifx.com/bdc_rate', :ssl_verify_mode => OpenSSL::SSL::VERIFY_NONE)) | |
entries = doc.css('.lagos-market-rates') | |
rate = entries.css('table')[0].css('tr')[1].css('td')[1].text | |
@formattedrate = rate[6..8] | |
render template: 'bdc/home' | |
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
class ParallelController < ApplicationController | |
def parallelrate | |
require 'openssl' | |
doc = Nokogiri::HTML(open('https://www.abokifx.com/', :ssl_verify_mode => OpenSSL::SSL::VERIFY_NONE)) | |
entries = doc.css('.lagos-market-rates-inner') | |
rate = entries.css('table')[0].css('tr')[1].css('td')[1].text | |
@formattedrate = rate[6..8] | |
render template: 'parallel/home' |
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 CustomTextInput extends React.Component<{}> { | |
handleSubmit = e => { | |
e.preventDefault(); | |
console.log(this.textInput); | |
}; | |
// tell Flow that we want to associate the textInput ref | |
// with an HTML Input button |
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 CustomTextInput extends React.Component<{}> { | |
handleSubmit = e => { | |
e.preventDefault(); | |
console.log(this.textInput); | |
}; | |
// tell Flow that we want to associate the textInput ref | |
// with an HTML Input button |