this.client = redis.createClient()
const asyncSet = promisify(this.client.set).bind(this.client)
return asyncSet(key, value, "EX", expiry)
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
describe('The Basics', () => { | |
it('works the way you would expect', () => { | |
expect("Hello world. Replace me with the number one for your first passing test!").toEqual(1) | |
}) | |
describe("Truthy v Falsy", () => { | |
beforeAll(() => { | |
//TODO: Go Read: https://www.sitepoint.com/javascript-truthy-falsy/ | |
}) |
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
#Install the language | |
brew install elixir | |
#Install Elixir package manager | |
mix local.hex | |
#Check the version | |
elixir -v | |
#Get latest of Phoenix framework |
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
const Card = (props) => { | |
return( | |
<div style={{margin: '1em'}}> | |
<img style={{width: 75}} src={props.avatar_url}/> | |
<div style={{ display: 'inline-block', marginLeft: 10}}> | |
<div style={{ fontSize: '1.25em', fontWeight: 'bold'}}>{props.name}</div> | |
<div>{props.company}</div> | |
</div> | |
</div> | |
) |
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
class Button extends React.Component{ | |
handleClick = () => { | |
this.props.onClickFunction(this.props.incrementValue) | |
} | |
render() { | |
return ( | |
<button onClick={ this.handleClick}> | |
+{this.props.incrementValue} | |
</button> |
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
class Button extends React.Component{ | |
handleClick = () => { | |
this.props.onClickFunction(this.props.incrementValue) | |
} | |
render() { | |
return ( | |
<button onClick={ this.handleClick}> | |
+{this.props.incrementValue} | |
</button> |
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
require 'sinatra' | |
set :server, 'webrick' | |
before do | |
response.headers['Access-Control-Allow-Origin'] = '*' | |
end | |
options '*' do | |
response.headers['Access-Control-Allow-Methods'] = 'GET, POST, PUT, PATCH, DELETE, OPTIONS' |