Skip to content

Instantly share code, notes, and snippets.

View amaurycatelan's full-sized avatar
🌻
what's up, doc?

Amaury Catelan amaurycatelan

🌻
what's up, doc?
View GitHub Profile
@amaurycatelan
amaurycatelan / Tutorial.md
Created June 28, 2019 21:08
A short discord.js tutorial with examples

Discord.js Tutorial - a short tutorial

After this tutorial you are able to code a cool bot with many commands and a level system.

Setup

Did you ever want to write your own bot but you think you are to bad for it or you don't have motivation? Stop thinking that way. Writing discord bots using discord.js is like, really, really, easy if you know some javascript basics.

In this tutorial we will use some ES6 and ES2017, which makes javascript more powerful. If you never heard of ES6/ES2017, i'll explain some stuff if i use it. Found a mistake? Just open an issue or fork and pull.

@amaurycatelan
amaurycatelan / Discord Join Messages
Created June 28, 2019 20:58 — forked from fourjr/Discord Join Messages.js
new member messages discord
loading lines: https://gist.github.com/fourjr/f94fc112cef6da07fc274216d5755420
Ctrl+Shift+I > Application > Frames > top > Scripts > d584711e150c6741c5cc.js > ctrl+f "seems op" or https://canary.discordapp.com/assets/d584711e150c6741c5cc.js
SYSTEM_MESSAGE_GUILD_MEMBER_JOIN: "[!!{username}!!](usernameOnClick) just joined the server - glhf!",
SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_01: "[!!{username}!!](usernameOnClick) just joined. Everyone, look busy!",
SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_02: "[!!{username}!!](usernameOnClick) just joined. Can I get a heal?",
SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_03: "[!!{username}!!](usernameOnClick) joined your party.",
SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_04: "[!!{username}!!](usernameOnClick) joined. You must construct additional pylons.",
@amaurycatelan
amaurycatelan / Growing A Discord Server.md
Created June 26, 2019 18:54 — forked from jagrosh/Growing A Discord Server.md
Tips for creating and growing a new Discord server

This guide is kept up-to-date as Discord and available resources change!

Creating and Growing a Discord Server

logo

Introduction

Hello! I'm jagrosh#4824! I'm writing this guide to try to help new server owners set up and grow their servers, which is a commonly-requested topic. It's very easy to go about this the wrong way, so it's best to be prepared and make smart decisions so that your community can flourish!

Background

You might be wondering: why am I qualified to write this guide? Excellent question! Well, I've created several successful Discord servers, including the Monster Hunter Gathering Hall (70,000+ members, game community), a bot support server (7,500+ members), and two bot community servers (25,000+ members and 20,000+ members). I also help moderate several large servers, and I am a Discord partner. Finally, I am very familiar with the technical aspects of Discord, which are useful for setting up servers and permi

@amaurycatelan
amaurycatelan / README.md
Created June 24, 2019 00:16 — forked from atenni/README.md
How to permalink to a gist's raw file

Problem: When linking to the raw version of a gist, the link changes with each revision.

Solution:

To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/

To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]

function fc1(value){ return `${value[0]['data']['feed']['author']} - ${value[1]['data']['feed']['author']} - lol`; }
@amaurycatelan
amaurycatelan / random.js
Created June 10, 2019 23:49 — forked from kerimdzhanov/random.js
JavaScript: get a random number from a specific range
/**
* Get a random floating point number between `min` and `max`.
*
* @param {number} min - min number
* @param {number} max - max number
* @return {number} a random floating point number
*/
function getRandomFloat(min, max) {
return Math.random() * (max - min) + min;
}
@amaurycatelan
amaurycatelan / ts-dl.sh
Created May 20, 2019 23:27 — forked from katopz/ts-dl.sh
Download .ts video file by ffmpeg via .m3u8
# Install ffmpeg
brew install ffmpeg
# Download
ffmpeg -i https://foo.com/bar.m3u8 -c copy -bsf:a aac_adtstoasc output.mp4
@amaurycatelan
amaurycatelan / README.rdoc
Created May 18, 2019 04:47 — forked from estum/README.rdoc
iTerm: Coprocess-script to auto-paste sudo password from keychain

iTerm Coprocess-script to auto-paste sudo password from keychain

Usage

  1. Open Keychain Access.app and create new object using the host as a name (“example.com”), username with sudo rights (“user”) and it’s password.

  2. Add a trigger for iTerm’s profile (‘Advanced‘ tab):

    • Regular Expression: \$ sudo

    • Action: Run Coprocess…

    • Parameters: /path/to/iterm_reply_with_keychain.rb [email protected]

@amaurycatelan
amaurycatelan / auto-deploy.md
Created April 9, 2019 22:03 — forked from domenic/0-github-actions.md
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with Travis

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

Create a compile script

You want a script that does a local compile to e.g. an out/ directory. Let's call this compile.sh for our purposes, but for your project it might be npm build or gulp make-docs or anything similar.

The out/ directory should contain everything you want deployed to gh-pages. That almost always includes an index.html.