Skip to content

Instantly share code, notes, and snippets.

View acquitelol's full-sized avatar
🌊
Often the most beautiful experiences are the unexpected ones ‹𝟹

Rosie acquitelol

🌊
Often the most beautiful experiences are the unexpected ones ‹𝟹
View GitHub Profile
@acquitelol
acquitelol / fraction.ts
Last active May 7, 2024 12:03
An implementation to display fractions
class Fraction {
private factor: number;
private numerator: number;
private denominator: number;
private greatestCommonDivisor(x: number, y: number): number {
if (y === 0) {
return x;
}
function callableArray<T>(...array: T[]) {
const _closure = (index: number) => index;
const typedClosure = _closure as unknown as typeof _closure & typeof array;
array.toString = function() {
return `[${array.map(element => JSON.stringify(element, null, 2))}]`;
}
const proxy = new Proxy(typedClosure, {
get(_, prop: string, __) {
# i wonder what this does
_ = [str, print]
_2 = lambda _,__: [_[_0:_0 + __] for _0 in range(0, len(_), __)]
*_0, = range(10)
*__, = range(len(_0))
_1 = []
_1 += _[0](__.pop(1)) + _[0](__.pop(0)) + _[0](__.pop(7))
*__, = range(len(_0) + 1)
_1 += _[0](__.pop(len(_0))) + _[0](__.pop(1))
*__, = range(len(_0) + 2)

How to get local administrator on an organisation-owned machine

Important

I am not liable or responsible for any damage caused by attempting this or any punishment by your organisation for bypassing organisation-owned monitoring software. Only use this at your own risk and ensure you have sufficient expertise to perform such a task.

Prerequisites

  • Another machine, running Windows
  • A USB flash drive with at least 8GB of free storage
  • A stable internet connection
  • Ensure USB-A ports are recognized by your machine for hardware other than peripherals (if you have an unlocked BIOS you may have to enable flash storage to be recognized first)
  • Ensure that you are alright with losing all of the information currently on the device; this includes making sure you've backed up any files you deem important.
@acquitelol
acquitelol / CuteMap.ts
Last active October 2, 2023 20:10
Custom reimplementation of JS map.
/**
* Custom reimplementation of JS map
* -----
* The constructor is O(n) to convert the 2d matrix into the dictionary format.
* The methods `get`, `set`, `delete`, `has`, and `clear` are all O(1) time complexity.
* All of the other methods are O(n) time complexity, just like the official JS Map.
* -----
* The `size` is decoupled from the dictionary, and manipulated seperately.
* It is only updated when the dictionary is manipulated (keys deleted, cleared, etc).
* This is to prevent it from needing to be an O(n) iterable, and therefore is O(1).