Skip to content

Instantly share code, notes, and snippets.

View shipstar's full-sized avatar

Kyle Shipley shipstar

  • Fishers, IN
View GitHub Profile
@shipstar
shipstar / simple.rb
Last active April 11, 2017 19:14
Kyle's solutions to Winston's thing
def find_duplicates(arr)
arr \
.group_by(&:itself)
.map { |el, appearances| el if appearances.size > 1 }
.compact
end
# Walkthrough:
# 1. [1,2,2,3,3,3].group_by(&:itself)
# => { 1 => [1], 2 => [2,2], 3 => [3,3,3] }
@shipstar
shipstar / examples.txt
Created September 7, 2015 12:17
Falcor + React Examples I've found
https://github.com/ekosz/postcard-sender
- Incorporated with React router
- Parent needs to know all fields children will use
https://gist.github.com/btholt/a5908e50eec2941ae6d7
- Does some light query consolidation (see `_.union(Plot.queries.movie(), Title.queries.movie(), Year.queries.movie())`)
- Doesn't use Flux, but I can see how it could be adapted
@shipstar
shipstar / cipher.md
Last active October 4, 2015 18:28
Vigenere Cipher Example -- Landsliders puzzle

You'll need to use the Vigenère table to calculate the encrypted text.

I'll walk through the encryption first; decryption just involves working backwards.

WARNING: There are spoilers below about the outcome of the Landsliders puzzle.

  1. Write the phrase you want to encrypt:
WWWWHATHAPPENEDINLANDSLIDERSCOM
@shipstar
shipstar / test.lua
Created May 9, 2022 15:44
lua test
function sayHello()
print("hello world")
end