Skip to content

Instantly share code, notes, and snippets.

Avatar

Évelyne Lachance eslachance

View GitHub Profile
View flatearth.md

The Flat Earth model is just plane wrong!

There's been so much arguments from flatties about how the "ball earth model" doesn't work and has no proof. Well, someone on the internet (not me, I can't take credit for this and I can't find the source) decided they had enough, and they made a list of all the massively obvious flaws in the idea that we live on a flat earth.

So here it is. Flat Earthers:

  • Have no complete working model or map which encompasses all their explanations. Oh there's a few models alright, but they actually contradict one another!
  • Have no way to determine proper distances or directions between two point on the earth not sharing the same longitude.
  • Have no explanation for how the sun and the moon circle the earth, or how the sun migrates from the tropic of Capricorn to the tropic of Cancer and back over the year.
  • Have no idea why the ancient Greeks such as Pythagoras, Aristotle, Eratosthenes and Aristarchus believed the earth was a sphere.
@eslachance
eslachance / example.js
Created Oct 22, 2018
Koa an Express Example
View example.js
/ Native Imports
const { sep, resolve, join } = require("path");
// Enmap Imports
const Enmap = require("enmap");
const users = new Enmap({ name: "users" });
// Bcrypt's hashing system
const bcrypt = require("bcrypt");
@eslachance
eslachance / README.md
Last active Apr 17, 2020
SQLite Points Bot
View README.md

SQLite-based Points Bot

This is the example code for This Guide. Please read that guide to understand the code provided here.

On the other hand, if you know what you're doing, here's a quick how-to:

  • In an admin command prompt or powershell, run npm i -g --production windows-build-tools.
  • Close all open command prompts for your bot, or the following won't work.
  • npm i discord.js better-sqlite3
  • Create app.js and config.json per below.
  • Make sure to get your bot token in the config.json.
@eslachance
eslachance / README.md
Last active Aug 18, 2020
Using Enmap for a points system
View README.md

Enmap Points Example

COMPATIBLE WITH VERSION 4 ONLY: Please note that the below has been updated to Enmap 4 and will not work in previous versions! Make sure to update Enmap if it's already installed!

This example uses a very, very simple bot made in discord.js to demonstrate how easily Enmap can be used to create a points system.

Installation

This code requires the following installation on Windows:

View keybase.md

Keybase proof

I hereby claim:

  • I am eslachance on github.
  • I am eslachance (https://keybase.io/eslachance) on keybase.
  • I have a public key ASDxK1jo_eBEkvGX7AEaeLt0Y0-TGcTvxqqwJ07j_vh1Dgo

To claim this, I am signing this object:

@eslachance
eslachance / index.js
Created Oct 3, 2017
Discord.js Bot Guide Season 2 - Episode 4 Code
View index.js
/* eslint consistent-return: 0, no-console: 0 */
const Discord = require('discord.js');
const client = new Discord.Client();
client.config = require('./config.json');
client.log = require('./functions/log.js');
client.commands = new Discord.Collection();
@eslachance
eslachance / README.md
Last active Sep 13, 2020
Using Enmap for per-server configurations
View README.md

Enmap Example

COMPATIBLE WITH VERSION 4 ONLY: Please note that the below has been updated to Enmap 4 and will not work in previous versions! Make sure to update Enmap if it's already installed!

This example uses a very, very simple bot made in discord.js to demonstrate how easily Enmap can be used to create a per-server configuration system.

Installation

This code requires the following installation on Windows:

@eslachance
eslachance / index_v11.js
Last active Sep 17, 2020
Simple, complete example of a bot in Discord.js
View index_v11.js
// Load up the discord.js library
const Discord = require("discord.js");
/*
DISCORD.JS VERSION 11 CODE
*/
// This is your client. Some people call it `bot`, some people call it `self`,
// some might call it `cootchie`. Either way, when you see `client.something`, or `bot.something`,
// this is what we're refering to. Your client.
@eslachance
eslachance / README.md
Last active Apr 19, 2020
example-oauth2-php
View README.md

EXAMPLE ONLY PROVIDED AS-IS

Please note I don't actually write PHP and was simply providing code from one friend to another. However, it's clear that some people actually find it useful, as I've gotten some comments and questions regarding it.

If you need help with this code please join a programming server that supports PHP, as I'm unable to assist.

Try discord.gg/programming or discord.gg/code , they're both very suitable servers!

@eslachance
eslachance / discord-etiquette.md
Last active Aug 31, 2020
Order in Discord - the Discord Etiquette
View discord-etiquette.md

Discord Etiquette and Savoir-Vivre

So, you're on Discord and you're wondering, what is generally allowed, and what isn't on this thing? What can I freely do, and what will get me kicked or banned?

TL;DR: Don't be a dick

This document attempts to answer this in a meaningful manner. Note however that each server is different, and each have their own rules. This is by no means an extensive, official list but rather general guidelines to follow.

You can’t perform that action at this time.