Skip to content

Instantly share code, notes, and snippets.

View geluso's full-sized avatar
🌒

Steve Geluso geluso

🌒
View GitHub Profile
@geluso
geluso / search-results.js
Created September 5, 2016 02:33
reddit image search results
var results = {"kind": "Listing", "data": {"facets": {}, "modhash": "", "children": [{"kind": "t3", "data": {"domain": "self.IAmA", "banned_by": null, "media_embed": {}, "subreddit": "IAmA", "selftext_html": "<!-- SC_OFF --><div class=\"md\"><p>Hi reddit. A little bit about each of us:</p>\n\n<ul>\n<li><p>Matthew: I'm the creator of The Oatmeal. </p></li>\n<li><p>Elan: I am Elan Lee, as of 30 days ago I make card games for a living.</p></li>\n<li><p>Shane: I was denied from being an 'In living color' Fly dancer because they said, and I quote, 'I Could pop but not lock'</p></li>\n</ul>\n\n<p>And we're the creators of "Exploding Kittens," the card game for people who are into kittens and explosions and laser beams and sometimes goats.</p>\n\n<p>There\u2019s about an hour left to get it here:<a href=\"https://www.kicks
@geluso
geluso / url-encode.js
Created September 5, 2016 16:58
URL Encode
// Write a function called urlEncode that accepts two parameters:
// 1. a string representing a URL
// 2. an optional object containing key value pairs
// The function should return a URL with a well-formatted query string.
// If `params` is undefiend simply return the url.
// The url and the beginning of the parameters should be separated with a questions mark `?`
// Every parameter after the first should be separated with an ampersand `&`
function urlEncode(url, params) {
// TODO: implement this function
}

Configure Wineskin for Starcraft Broodwar OSX 10.12

I had trouble running Starcraft Broodwar on OSX 10.12 Sierra. My games were extremely choppy, even in offline single player mode. I found these steps to configure the registry editor for the game and everything works much better!

Everything was derived from steps found here. I'm creating this Gist for my own posterity:

version: "2"
services:
web:
build: .
volumes:
- .:/code
volumes:
- .:/app
ports:
- "3000:3000"
@geluso
geluso / 05-cipher-grading-a.md
Last active July 18, 2018 19:48
05-cipher-grading A

Total: 3 points. None of the ciphers are implemented, class properties and methods placed inside classes incorrectly and non-functionally, no tests.

InaccessibleObjectException

Hm, I've never seen InaccessibleObjectException before. Where did you get the idea to use this? Also, I don't see anything inside the try block that would possible cause an exception. Checking an int with == and printing things are basically impossible to fail.

I looked it up and it looks like a Java 9 thing. You'll have to show me how it

@geluso
geluso / 05-cipher-grading-B.md
Created July 18, 2018 19:17
05-cipher-grading-B

Total points: 8/10. -1 point class inheritance doesn't override encode and decode. -1 point no real tests implemented.

Project Structure

Nice project structure especially with separating out the src and test directories. It's true that most Java projects do their structure like that, but I just haven't bothered with it yet as I've been using the auto-generated IntelliJ code. Eventually we'll get to some tooling that will set things like this up correctly automatically.

Total points: 8/10

Overall Structure

-1 point: missing Main.java file described in lab writeup. -1 point: zero tests

There should be a seperation between the objects you create and a program that uses those objects. Each of the cipher files should just have code that encodes and decodes text. The Main.java should be there to accomplish the task of being a program that collects user input, creates cipher objects and

Total points: 2/10

Overall Structure

-1 point: missing Main.java file described in lab writeup. -1 point: zero tests -2 points: missing overall interactive input/output program. -2 points: CaesarShiftCipher not implemented -2 points: KeywordCipher not implemented

There should be a seperation between the objects you create and a program that

@geluso
geluso / strategies-for-building-a-web-application.md
Created August 2, 2018 17:05
Strategies for Building a Web Application

Strategies for Building a Web Application

Web applications are complex. When you build one where should you begin? The trick is to start with something tangible that you can observe and manipulate and constantly improve in small steps from there. Do not become over-zealous and try to build too many things at once. Like stacking rocks along a river you should make sure a new rock balances on all others without your hands before trying to stack the next rock.

When your building a web application start with your server. Configure your