Skip to content

Instantly share code, notes, and snippets.

View JackHowa's full-sized avatar

Jack Howard JackHowa

View GitHub Profile
@JackHowa
JackHowa / movieClub-idea
Created May 25, 2017 16:24
Movie Club is for opinionated movie watchers and their opinionated friends
Rotten Tomatoes api
IMDB api
google sheet integration for db management
basically a crud app with user reviews and comments
----------------------------------
scratch.rb
class Card
# wrongly added has_one
# one card can have many guesses from different users
# or even during different rounds
has_many :guesses
end
php --version
PHP 7.1.8 (cli) (built: Aug 7 2017 15:02:45) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
httpd -v
Server version: Apache/2.4.25 (Unix)
Server built: Feb 6 2017 20:02:10
@JackHowa
JackHowa / spinal-case
Created December 21, 2017 03:43
ccc spinal case challenge
Convert a string to spinal case. Spinal case is all-lowercase-words-joined-by-dashes.
function spinalCase(str) {
return str.toLowerCase().replace(/ |_/gi, '-'); // use the | for or matching
// need to find match case [a-z] sequence
}
spinalCase('This Is Spinal Tap');
class Button extends React.Component {
// this state can only be accessed within this one
// state = { timer: 1 };
// handleClick = () => {
// this.setState((prevState) => ({
// timer: prevState.timer + 1
// }));
// };
@JackHowa
JackHowa / index.html
Created February 19, 2018 01:45
NyyrLK
<table id="card-container">
<tbody>
<tr>
<td class="card">down</td>
<td class="card">down</td>
</tr>
<tr>
<td class="card">down</td>
<td class="card">down</td>
</tr>
@JackHowa
JackHowa / SertifiController.php
Last active February 22, 2018 20:39
basic implementation with questions
/* questions
find file status? better way than checking whether there's a document signed?
// best way to identify loans? can do file id and document id. but what about multiple documents? find all the documents that are signed for an individual unit?
-is there an id?
relevant info
Add a basic implementation of sertifi get link, create signature and get status based on file id
Add a basic template outline for the show page of sertifi
note: routes don't currently take in relevant info. and there's no front-end. but I think this satisfies the given request of getting a sertifi loan status and investigating the api.
<div id='rating'>
<span>*</span>
<span>*</span>
<span>*</span>
<span>*</span>
<span>*</span>
</div>
function checkCashRegister(productPrice, cashGiven, cashInDrawer) {
let changeNeeded = cashGiven - productPrice;
let errors = checkErrors(changeNeeded, cashInDrawer);
if (typeof errors == "string") {
return errors;
} else {
return [];
}
}
@JackHowa
JackHowa / dope react spread
Created May 3, 2018 02:33
react working with data
// this should be presentation
const Card = (props) => {
return (
<div style={{margin: '1em'}}>
<img width='75' src={props.avatar_url} />
<div style={{display: 'inline-block', marginLeft: 10}}>
<div style={{fontSize: '1.25em', fontWeight: '1.25em'}}>{props.name}</div>
<div>{props.company}</div>
</div>
</div>