Skip to content

Instantly share code, notes, and snippets.

@Happy-Ferret
Happy-Ferret / main.py
Created May 9, 2022 23:20
Basic Telegram module system for Telethon
api_id = 0
api_hash = ""
botToken = ""
from telethon import TelegramClient, events
import mods
bot = TelegramClient('bot', api_id, api_hash)
bot.start(bot_token=botToken)
@Happy-Ferret
Happy-Ferret / borrow.cpp
Created May 2, 2022 22:20 — forked from foonathan/borrow.cpp
Quick'n'dirty implementation of Rust's borrow checker for a C++Now Lightning Talk - not supposed to be used
#include <iostream>
#include "borrow_checker.hpp"
int main()
{
auto i = 42;
// borrow `i` under name `ref`
borrow_var(ref, i)
@Happy-Ferret
Happy-Ferret / translate.py
Created February 20, 2022 15:39 — forked from DollarAkshay/translate.py
Script to translate JSON strings with googletrans library in python. Useful for web language localization
import json
import googletrans
import os
from googletrans import Translator
def translateString(data, destLangCode):
global translator
@Happy-Ferret
Happy-Ferret / TelegramBotFramework.py
Created February 12, 2022 18:12 — forked from kaecy/TelegramBotFramework.py
Simple Telegram Bot API for Python. (requires python 3)
# Version: 0.3.0
# Rewrite: Incomplete
import re
import mpf # post file support
import utils
import enum
import jnet
import json
@Happy-Ferret
Happy-Ferret / ll.bnf
Created June 29, 2019 22:47 — forked from mewmew/ll.bnf
Gocc grammar for LLVM IR.
// Based on https://github.com/llir/grammar/blob/6cb09c87c6e434310b41d3c5b2b3d59c94f986c4/ll.bnf
// ### [ Lexical part ] ########################################################
_ascii_letter_upper
: 'A' - 'Z'
;
_ascii_letter_lower
: 'a' - 'z'
@Happy-Ferret
Happy-Ferret / Builtins.cpp
Created June 29, 2019 12:08
C++ IR Tabby
// C++ Builtins
#include <iostream>
#include <string>
using namespace std;
// Nothing Class
class Nothing {
@Happy-Ferret
Happy-Ferret / Runner
Created June 25, 2019 01:39 — forked from Westenburg/Runner
Simple endless runner
-- Mountains
-- Simple endless runner game by West
-- taking inspiration from "Alto's adventure" for the Mountain backdrop and day to night cycle
-- Use this function to perform your initial setup
function setup()
--get rid of the sidebar
displayMode(FULLSCREEN)
-- define 3 the three game states for the finite state machine game engine and initialise gamestate variable
READY=1
GAMEOVER=2
@Happy-Ferret
Happy-Ferret / Chrome_dinosaur.cpp
Created June 25, 2019 01:33 — forked from onkar27/Chrome_dinosaur.cpp
Chrome's Dinosaur Game designed in C++ "graphics.h"
//Onkar J Sathe
#include <bits/stdc++.h>
#include <graphics.h>
using namespace std;
#define Mx getmaxx()
#define My getmaxy()
#include <dos.h>
#include <windows.h>
int main()
@Happy-Ferret
Happy-Ferret / theme.json
Created June 22, 2019 17:35
Happy Theme
{
"name": "happy-theme",
"type": "dark",
"colors": {
"activityBarBadge.background": "#007acc",
"editor.background": "#1e1e1e",
"editor.foreground": "#d4d4d4",
"editor.inactiveSelectionBackground": "#3a3d41",
"editor.selectionHighlightBackground": "#add6ff26",
"editorIndentGuide.activeBackground": "#707070",
@Happy-Ferret
Happy-Ferret / clip_spritesheet.go
Created June 11, 2019 12:56 — forked from diegomrodz/clip_spritesheet.go
SDL Samples in Go SDL
package main
import (
"github.com/banthar/Go-SDL/sdl"
)
const (
SCREEN_WIDTH int = 640
SCREEN_HEIGHT int = 480
SCREEN_BPP int = 32