Skip to content

Instantly share code, notes, and snippets.

View anthify's full-sized avatar
💻
coding

Anthony O'Neill anthify

💻
coding
View GitHub Profile
@anthify
anthify / premloop.js
Created August 16, 2019 11:48
Clue for Premier League Challenge...
let prem = {};
const tallyMatch = ({ team1, team2, score1, score2 }) => {
// Check to see if the `prem` object
// contains the team yet, and if not add it.
if (!prem[team1.name]) {
prem[team1.name] = { points: 0, name: team1.name };
}
if (!prem[team2.name]) {
prem[team2.name] = { points: 0, name: team2.name };
@anthify
anthify / parseFilePath.js
Created September 16, 2019 13:53
Takes path string and returns directory, filename, and extension in object.
export default path => ({
dir: path.substring(0, path.lastIndexOf('/')),
filename: path.substring(path.lastIndexOf('/') + 1, path.lastIndexOf('.')),
ext: path.substring(path.lastIndexOf('.') + 1)
});
export default [
{ value: "GBP", label: "🇬🇧 British Pound"},
{ value: "CAD", label: "🇨🇦 Canadian Dollar"},
{ value: "HKD", label: "🇭🇰 Hong Kong Dollar"},
{ value: "USD", label: "🇺🇸 U.S.A Dollar"},
{ value: "PHP", label: "🇵🇭 Philippine Peso"},
{ value: "DKK", label: "🇩🇰 Danish Krone"},
{ value: "HUF", label: "🇭🇺 Hungarian Forint"},
{ value: "CZK", label: "🇨🇿 Czech Koruna"},
{ value: "RON", label: "🇷🇴 Romanian Leu"},
[
{
"value": "AF",
"label": "Afghanistan"
},
{
"value": "AX",
"label": "Åland Islands"
},
@anthify
anthify / us-states.json
Created August 11, 2021 06:31 — forked from rhythnic/us-states.json
Name, abbreviation, and numeric code for all 50 US states and some territories.
[
{
"id": "01",
"name": "Alabama",
"abbr": "AL"
},
{
"id": "02",
"name": "Alaska",
"abbr": "AK"