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
return ( | |
<div className='App'> | |
<Arrow | |
direction='left' | |
clickFunction={() => onArrowClick('left')} | |
/> | |
<Slide in={slideIn} direction={slideDirection}> | |
<div> | |
<CarouselSlide content={content} /> | |
</div> |
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
useEffect(() => { | |
const handleKeyDown = (e) => { | |
if (e.keyCode === 39) { | |
onArrowClick('right'); | |
} | |
if (e.keyCode === 37) { | |
onArrowClick('left'); | |
} | |
}; |
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
const SlackBot = require('slackbots'); | |
const dotenv = require('dotenv'); | |
const cron = require('node-cron'); | |
dotenv.config(); |
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
BOT_TOKEN=[your-copied-token] |
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
const bot = new SlackBot({ | |
token: `${process.env.BOT_TOKEN}`, | |
name: '[your-app-name]', | |
}); |
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
bot.on('start', function () { | |
bot.postMessageToUser('[your-username]', '[your-app-name] starting...'); | |
}); |
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
function createJob() { | |
const task = cron.schedule( | |
'32 12 * * 1-5', | |
() => { | |
bot.postMessageToChannel('lunchbot-test', 'go eat lunch ali'); | |
}, | |
{ | |
scheduled: true, | |
timezone: 'America/New_York', | |
} |
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
bot.on('start', function () { | |
bot.postMessageToUser('[your-username]', '[your-app-name] starting...'); | |
createJob(); | |
}); |
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
{ | |
"name": "Google Calendar Navigation Shortcuts", | |
"version": "1.0", | |
"description": "Add arrow navigation to Google Calendar", | |
"manifest_version": 2 | |
} | |
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
"icons": { | |
"16": "assets/icon.png", | |
"48": "assets/icon.png", | |
"128": "assets/icon.png" | |
}, | |
"permissions": ["https://calendar.google.com/*"], |