View linked_list_challenge.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fakeBrowser(initial) { | |
const functionsToRun = [initial]; | |
const fakeWindow = { | |
addCallback: function(fn) { | |
functionsToRun.push(fn) | |
} | |
} | |
while(functionsToRun.length > 0) { |
View chain.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const hashMaker = require("hash.js"); | |
const hashString = string => | |
hashMaker | |
.sha256() | |
.update(string) | |
.digest("hex"); | |
const findBlockWithHashPrefix = (signedGenerator, prefix) => { | |
let nonce = 0; |
View gist:68a199005ef189d83a19b862682e68eb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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" |
View Gemfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "https://rubygems.org" | |
gem "httparty" | |
gem "geocoder" | |
gem "slack-poster" |
View gist:512c550342e52e7e0eec42e2d079d04d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Random; | |
class Walker { | |
int[] xYPosition = new int[2]; | |
int[] prevXYPosition = new int[2]; | |
Random generator; | |
Walker() { | |
generator = new Random(); |