Skip to content

Instantly share code, notes, and snippets.

View alexsmbaratti's full-sized avatar
:atom:
Working with Xcode

Alex Baratti alexsmbaratti

:atom:
Working with Xcode
View GitHub Profile
@alexsmbaratti
alexsmbaratti / installNodeAmazonLinux.sh
Created March 16, 2018 21:35
Install Node on Amazon Linux
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
. ~/.nvm/nvm.sh
echo "Installing latest long term-support-version of Node"
nvm install --lts
node -e "console.log('Running Node.js ' + process.version)"
@alexsmbaratti
alexsmbaratti / .DISCORD_TUTORIAL.MD
Last active May 31, 2021 04:37
Discord.js Template

Tutorial for Discord.js (a.k.a. How to Make Your Own Discord Bot)

Note: I'm busy as of writing this and this tutorial is not complete. Whatever state this file is in, please remember to add a .gitignore and hide config.json in it. config.json will contain your API keys for Discord! If this is comprimised, others may have access to your bot and how it responds with commands.

To register your soon-to-be bot with Discord, go to their developer portal and create a new app. Give it a name at the very least. Click 'Create App.' On the next screen, click 'Create a Bot User.' Note the values Client ID, Client Secret, and Token.

I recommend creating a bot testing server in Discord to test out your bot without disturbing others. Plus, you'll be guarenteed the permissions needed to add a bot to your server. Add your client ID to the URL https://discordapp.com/oauth2/authorize?client_id=[CLIENT_ID]&permissions=0&scope=bot where specified and go to

@alexsmbaratti
alexsmbaratti / installNode.sh
Created October 19, 2017 18:14
Install Node 7.5.0 on Linux
wget https://nodejs.org/dist/v7.5.0/node-v7.5.0-linux-armv6l.tar.gz
tar -xvf node-v7.5.0-linux-armv6l.tar.gz
cd node-v7.5.0-linux-armv6l
sudo cp -R * /usr/local/