Skip to content

Instantly share code, notes, and snippets.

Avatar
🧨
BANG

Kay neoeno

🧨
BANG
View GitHub Profile
@neoeno
neoeno / linked_list_challenge.rb
Last active Jun 19, 2020
Linked List Challenge
View linked_list_challenge.rb
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)
View sad.c
#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() {
View gist:69bb666e763a730eff0f0d098eb50772
function fakeBrowser(initial) {
const functionsToRun = [initial];
const fakeWindow = {
addCallback: function(fn) {
functionsToRun.push(fn)
}
}
while(functionsToRun.length > 0) {
@neoeno
neoeno / chain.js
Last active Dec 24, 2017
Blockchain (I think?? maybe there needs to be more to be real but it's something)
View chain.js
const hashMaker = require("hash.js");
const hashString = string =>
hashMaker
.sha256()
.update(string)
.digest("hex");
const findBlockWithHashPrefix = (signedGenerator, prefix) => {
let nonce = 0;
View gist:68a199005ef189d83a19b862682e68eb
$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 Aug 22, 2016
Pokemon Go Slack Bot
View Gemfile
source "https://rubygems.org"
gem "httparty"
gem "geocoder"
gem "slack-poster"
@neoeno
neoeno / gist:512c550342e52e7e0eec42e2d079d04d
Last active May 25, 2016
120,001 word sentence novel
View gist:512c550342e52e7e0eec42e2d079d04d
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
View gist:4281024
import java.util.Random;
class Walker {
int[] xYPosition = new int[2];
int[] prevXYPosition = new int[2];
Random generator;
Walker() {
generator = new Random();