Skip to content

Instantly share code, notes, and snippets.

View neoeno's full-sized avatar
🧨
BANG

Kay Lack neoeno

🧨
BANG
View GitHub Profile
@neoeno
neoeno / linked_list_challenge.rb
Last active November 6, 2024 23:09
Linked List Challenge
class LinkedList
attr_reader :head
attr_accessor :tail
def self.from_ruby_list(list)
return nil if list.empty?
new(list[0], self.from_ruby_list(list[1..]))
end
def initialize(head, tail = nil)
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <time.h>
#include <stdlib.h>
const char* RESET = "\x1B[0m";
const char *COLORS[] = { "\x1B[31m", "\x1B[32m", "\x1B[33m", "\x1B[34m", "\x1B[35m", "\x1B[36m" };
int main() {
function fakeBrowser(initial) {
const functionsToRun = [initial];
const fakeWindow = {
addCallback: function(fn) {
functionsToRun.push(fn)
}
}
while(functionsToRun.length > 0) {
@neoeno
neoeno / chain.js
Last active November 6, 2024 23:10
Blockchain (I think?? maybe there needs to be more to be real but it's something)
const hashMaker = require("hash.js");
const hashString = string =>
hashMaker
.sha256()
.update(string)
.digest("hex");
const findBlockWithHashPrefix = (signedGenerator, prefix) => {
let nonce = 0;
@neoeno
neoeno / gist:68a199005ef189d83a19b862682e68eb
Created August 1, 2017 12:29
Basic PHP strachey love letter algorithm extracted from https://github.com/gingerbeardman/loveletter
$sals1 = array("Beloved", "Darling", "Dear", "Dearest", "Fanciful", "Honey");
$sals2 = array("Chickpea", "Dear", "Duck", "Jewel", "Love", "Moppet", "Sweetheart");
$adjs = array("affectionate", "amorous", "anxious", "avid", "beautiful", "breathless", "burning", "covetous", "craving", "curious", "eager", "fervent", "fondest", "loveable", "lovesick", "loving", "passionate", "precious", "seductive", "sweet", "sympathetic", "tender", "unsatisfied", "winning", "wistful");
$nouns = array("adoration", "affection", "ambition", "appetite", "ardour", "being", "burning", "charm", "craving", "desire", "devotion", "eagerness", "enchantment", "enthusiasm", "fancy", "fellow feeling", "fervour", "fondness", "heart", "hunger", "infatuation", "little liking", "longing", "love", "lust", "passion", "rapture", "sympathy", "thirst", "wish", "yearning");
$advs = array("affectionately", "ardently", "anxiously", "beautifully", "burningly", "covetously", "curiously", "eagerly", "fervently", "fondly", "impatiently", "keenly", "lovingly"
@neoeno
neoeno / Gemfile
Last active November 6, 2024 23:13
Pokemon Go Slack Bot
source "https://rubygems.org"
gem "httparty"
gem "geocoder"
gem "slack-poster"
@neoeno
neoeno / gist:512c550342e52e7e0eec42e2d079d04d
Last active November 6, 2024 23:09
120,001 word sentence novel
Olivetti was the calmest broadcast of the lowliest legislature, the largest
contribution of the staunchest trout, the highest underwriting of the closest
proposal, the strongest might of the simplest comfort, the coolest triple-crown
of the greatest close, the strongest climate of the highest-paid argument, the
fastest discredit of the finest flat, the highest-paid intensity of the
worthiest charter, the hottest counseling of the fastest song, the worst
continent of the coolest yarn, the simplest oil of the hottest event, the
simplest praise of the fiercest m, the largest court of the earliest geography,
the youngest bunt of the dullest door-to-door, the smallest pressed-paper of
the simplest am, the dullest headboard of the hottest barrage, the closest
import java.util.Random;
class Walker {
int[] xYPosition = new int[2];
int[] prevXYPosition = new int[2];
Random generator;
Walker() {
generator = new Random();