Skip to content

Instantly share code, notes, and snippets.

View EsteveSegura's full-sized avatar
❄️
Focusing

Esteve Segura EsteveSegura

❄️
Focusing
View GitHub Profile
@EsteveSegura
EsteveSegura / pseudoRNG.js
Created December 21, 2023 00:42
PseudoRNG
class LinearRadGen{
constructor(seed) {
this.a = 1103515245;
this.c = 12345;
this.m = Math.pow(2,32);
this.seed = seed;
}
next() {
this.seed = (this.a * this.seed + this.c) % this.m;
@EsteveSegura
EsteveSegura / README.md
Created November 24, 2023 11:39
Chayane approve - meme creator
2g1c
2 girls 1 cup
acrotomophilia
alabama hot pocket
alaskan pipeline
anal
anilingus
anus
apeshit
arsehole
@EsteveSegura
EsteveSegura / SwearWordsList.txt
Created December 30, 2022 21:10
Swear Words List
cheesehead
whitepower
luckycammeltoe
illegal
slopies
cock-head
mothafuckings
pee
twunt
boink
@EsteveSegura
EsteveSegura / proxy.js
Created June 28, 2022 18:02
serverProxy
const net = require("net");
const server = net.createServer();
server.on("connection", (clientToProxySocket) => {
console.log("Client connected to proxy");
clientToProxySocket.once("data", (data) => {
let isTLSConnection = data.toString().indexOf("CONNECT") !== -1;
let serverPort = 80;
let serverAddress;
hey
@EsteveSegura
EsteveSegura / discordAuth.js
Created August 12, 2020 20:45
oauth discord
const express = require('express');
const btoa = require('btoa');
const fecth = require('node-fetch');
const app = express();
const idDiscord = 'xxxxxxxxxxxxxxxx';
const secretDiscord = 'xxxxxxxxxxxxxxxx';
const redirect = 'http://localhost:3000/callback';
@EsteveSegura
EsteveSegura / Montecarlo.js
Created July 20, 2020 16:12
calculate pi
let r = 5;
let points_total = 0;
let points_inside = 0;
while (1) {
points_total++;
let x = Math.random() * r * 2 - r
let y = Math.random() * r * 2 - r
@EsteveSegura
EsteveSegura / FindIndexPi.js
Created July 17, 2020 17:23
Encontrar strings dentro de pi!
const fs = require('fs')
let preLoadPi = fs.readFileSync('./pi-billion.txt', 'utf-8')
function findIndexInPi(str,pi){
let n = parseInt(str,36)
let index = preLoadPi.indexOf(n)
let nL = n.toString().split("").length
let numInPi = ""
@EsteveSegura
EsteveSegura / Ball.cs
Created March 9, 2020 15:40
Ball controller.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Ball : MonoBehaviour{
public Rigidbody rb;
public float force;
void Start(){