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
// This example populate the 2016,2017 and 2018 holidays in Colombia | |
[2016, 2017, 2018].forEach(function(year){ | |
var holidaysHelper = new HolidaysHelper(year); | |
// Fixed | |
[ | |
{month: HolidaysHelper.Months.January, day: 1, description: "Año Nuevo"}, | |
{month: HolidaysHelper.Months.May, day: 1, description: "Día del Trabajo"}, | |
{month: HolidaysHelper.Months.July, day: 20, description: "Grito de Independencia"}, | |
{month: HolidaysHelper.Months.August, day: 7, description: "Batalla de Boyacá"}, |
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
import React from 'react' | |
import useCanvas from '../hooks/useCanvas' | |
const Canvas = props => { | |
const { draw, ...rest } = props | |
const canvasRef = useCanvas(draw) | |
return ( | |
<canvas ref={canvasRef} {...rest} /> | |
) |
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
import React from 'react' | |
import useCanvas from '../hooks/useCanvas' | |
const Canvas = props => { | |
const { draw, ...rest } = props | |
const canvasRef = useCanvas(draw) | |
return ( | |
<canvas ref={canvasRef} {...rest} /> | |
) |
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
import { useRef, useEffect } from 'react' | |
const useCanvas = (draw) => { | |
const canvasRef = useRef(null) | |
useEffect(() => { | |
const canvas = canvasRef.current | |
const context = canvas.getContext('2d') |
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
-- MarI/O by SethBling | |
-- Feel free to use this code, but please do not redistribute it. | |
-- Intended for use with the BizHawk emulator and Super Mario World or Super Mario Bros. ROM. | |
if gameinfo.getromname() == "Super Mario World (USA)" then | |
Filename = "DP1.state" | |
ButtonNames = { | |
"A", | |
"B", | |
"X", |