Skip to content

Instantly share code, notes, and snippets.

View Alekseyyy's full-sized avatar
👩‍💻
fucking irate

Aleksey Alekseyyy

👩‍💻
fucking irate
View GitHub Profile
@Alekseyyy
Alekseyyy / README (Medium).md
Last active June 9, 2023 16:52
A gist of my Medium code snippets

A gist of my Medium code snippets

how I structure the files:

  • For CTFs: ctf.[year].[ctf's name].[challenge's name].[filename].[ext]
  • For other Medium articles: medium.[date (format: DDMMYYYY)].[article name].[filename].[ext]

Index of files by article:

A simple JavaScript sorting utility (17 Feb., 2022)
// baby-go reconstruction
// by Aleksey
// - https://alekseyyy.github.io
// - @EpsilonCalculus / @EntropyThot
package main
import (
"fmt"
"os"
from scipy.stats import pearsonr
X = (4, 6, 1, 1, 0, 2, 5, 4, 0, 0)
Y = (201, 165, 145, 150, 160, 113, 140, 147, 83, 108)
Z = (15, 30, 28, 41, 18, 5, 7, 16, 15, 16)
print("Correlation between X and Y:", pearsonr(X, Y))
# Correlation between X and Y and p-value: (0.5258752464261707, 0.1184620607638331)
print("Correlation between Y and Z:", pearsonr(Y, Z))
# Aleksey's solution to the Collatz problem
count = 0
x = 33
while x > 1:
print("Iteration:", count, "\tx =", x)
if x % 2 == 0:
x = x / 2
# submitter.py
# this was written to solve the "Are you fast enough?" challenge
# By Aleksey
# - github.com/Alekseyyy
# - medium.com/@EpsilonCalculus
import time
from selenium.webdriver import Firefox
from selenium.webdriver.firefox.options import Options
' Infinite reboot script
' By Aleksey
' -- https://medium.com/@EpsilonCalculus
' -- https://github.com/Alekseyyy
Option Explicit
On Error Resume Next
Set oFileSystem = CreateObject("Scripting.FileSystemObject")
Set WshShell = CreateObject("WScript.Shell")
/*
* Project Euler: Classic, "Even Fibonacci numbers" solution
* Implementation by A. S. "Aleksey" Ahmann <hackermaneia@riseup.net>
* - https://github.com/Alekseyyy
*
* Problem link: https://projecteuler.net/problem=2
*/
import std.stdio : writeln;
import std.algorithm.iteration : sum;
function checkCreds() {
if (username.value == "Admin" && atob(password.value) == "goldenticket")
{
var key = atob(encoded_key);
var flag = "";
for (let i = 0; i < key.length; i++)
{
flag += String.fromCharCode(key.charCodeAt(i) ^ password.value.charCodeAt(i % password.value.length))
}
document.getElementById("banner").style.display = "none";
/*
* Cybercocaine Programme
* This'll make ur computer higher than an airplane ;-)
* By Aleksey
* github.com/Alekseyyy
* twitter.com/EpsilonCalculus
*/
using System;
using System.Drawing;

Keybase proof

I hereby claim:

To claim this, I am signing this object: