Skip to content

Instantly share code, notes, and snippets.

View emiflake's full-sized avatar
🌼
Petaline enjoyer

emiflake

🌼
Petaline enjoyer
  • Liqwid Labs
  • Amsterdam, The Netherlands
  • 05:34 (UTC +02:00)
View GitHub Profile
@emiflake
emiflake / index.js
Last active February 8, 2019 20:22
Discord downloader
const Discord = require('discord.js');
const R = require('ramda');
const bot = new Discord.Client();
const request = require('request');
const fs = require('fs');
const path = require('path');
const mkdirp = require('mkdirp');
const prog = require("commander");
@emiflake
emiflake / iceverything.ts
Last active April 25, 2017 18:02
I See Everything
import Discord = require("discord.js")
import fs = require("fs");
import path = require("path");
namespace ISeeEverything {
enum LogType {
MESSAGE_SENT,
MESSAGE_EDITED,
MESSAGE_DELETED,
USER_JOINED,
template <class T>
class EventHandler
{
vector<void(*)(Event<T>&)> subs;
public:
EventHandler::EventHandler();
void EventHandler::subscribe(void(*handler)(Event<T>&));
void EventHandler::emit(Event<T> value);
};
@emiflake
emiflake / utils.js
Created December 21, 2016 16:54
Some talkomatic utils
String.prototype.shuffle = function () {
var a = this.split(""),
n = a.length;
for(var i = n - 1; i > 0; i--) {
var j = Math.floor(Math.random() * (i + 1));
var tmp = a[i];
a[i] = a[j];
a[j] = tmp;
@emiflake
emiflake / JavaScript
Created December 21, 2016 16:54
Talkomatic Utils
String.prototype.shuffle = function () {
var a = this.split(""),
n = a.length;
for(var i = n - 1; i > 0; i--) {
var j = Math.floor(Math.random() * (i + 1));
var tmp = a[i];
a[i] = a[j];
a[j] = tmp;
class Fraction
@top
@bot
# top is the x in (x/n)
# bot is the n in (x/n)
def initialize top, bot
@top = top