Skip to content

Instantly share code, notes, and snippets.

Évelyne Lachance eslachance

Block or report user

Report or block eslachance

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
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 Oct 20, 2019
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 Nov 5, 2019
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 Nov 5, 2019
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.js
Last active Nov 12, 2019
Simple, complete example of a bot in Discord.js
View index.js
// Load up the discord.js library
const Discord = require("discord.js");
// 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.
const client = new Discord.Client();
// Here we load the config.json file that contains our token and our prefix values.
const config = require("./config.json");
@eslachance
eslachance / index.php
Last active Sep 1, 2019
example-oauth2-php
View index.php
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
if (isset($_GET["error"])) {
echo json_encode(array("message" => "Authorization Error"));
} elseif (isset($_GET["code"])) {
Header("Location: login.php?code={$_GET["code"]}");
@eslachance
eslachance / discord-etiquette.md
Last active Aug 12, 2019
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.