Skip to content

Instantly share code, notes, and snippets.

View Legend-of-iPhoenix's full-sized avatar

_iPhoenix_ Legend-of-iPhoenix

View GitHub Profile
mod1 = 2147483563
mod2 = 2147483399
mult1 = 40014
mult2 = 40692
seed1 = 12345
seed2 = 67890
def seed(n):
global seed1, seed2, mod1, mod2
if n < 0:
/**
* MIT License
*
* Copyright (c) 2021 Peter Tillema
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
// For compatibility. Not sure with what.
#define int const void *
// It's good practice to inline frequently used functions.
#define main() main??(??)
// Never assume that NULL is 0. This will keep potential future collaborators on their toes.
#undef NULL
#define NULL 26880
#define O430 &15??(main??)
@GuillaumeDua
GuillaumeDua / 13_valuable_things_I_learned_using_CMake.md
Last active April 7, 2024 09:28
13 valuable things I learned using CMake

13 valuable things I learned using CMake

Author : Dua Guillaume
Date : 04-26-2020

Requirement : A first experience with CMake

Intro

As a modern C++ specialist, my job is to focus on software development, from a performance and quality perspective.

@DasWolke
DasWolke / microservice bots.md
Last active March 23, 2024 16:41
Microservice bots

Microservice Bots

What they are and why you should use them

Introduction

Recently more and more chatbots appear, the overall chatbot market grows and the platform for it grows as well. Today we are taking a close look at what benefits creating a microservice chatbot on Discord - (a communication platform mainly targeted at gamers) would provide.

The concepts and ideas explained in this whitepaper are geared towards bots with a bigger userbase where the limits of a usual bot style appear with a greater effect

Information about Discord itself

(If you are already proficient with the Discord API and the way a normal bot works, you may skip ahead to The Concept)

@anantn
anantn / firebase_detect_data.js
Created December 18, 2012 00:54
Firebase: Detecting if data exists. This snippet detects if a user ID is already taken
function go() {
var userId = prompt('Username?', 'Guest');
checkIfUserExists(userId);
}
var USERS_LOCATION = 'https://SampleChat.firebaseIO-demo.com/users';
function userExistsCallback(userId, exists) {
if (exists) {
alert('user ' + userId + ' exists!');