Skip to content

Instantly share code, notes, and snippets.

@danielmconrad
danielmconrad / typeahead.md
Last active June 11, 2020 21:24
Typeahead Challenge

Part 1: A typeahead function

You're given a JSON array of Illinois Cities. With this list, your task is to build out a function that accepts a string and returns back cities that contain the given characters. The function should accept another parameter to limit the amount of matches it returns. The results should be returned in alphabetical order with priority given to matches that start with the characters.

Use your language or framework of choice, and store the data in any fashion you'd like, as long as it's web friendly.

[
  "Summit", "Palatine", "Naperville", "North Chicago", "Springfield", 
  "Arlington Heights", "Oak Park", "Moline", "Calumet City", "Ottawa", 
@danielmconrad
danielmconrad / unifi-pi.md
Last active March 14, 2023 15:52
Installing Unifi Controller + Pi-hole on a Raspberry Pi

Installing Unifi Controller + Pi-hole

Update Packages

sudo rpi-update
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get autoremove && sudo apt-get autoclean
sudo apt-get install vim -y
@danielmconrad
danielmconrad / gist:085dc402dc4b186a8641
Created May 20, 2015 19:51
Challenge: myJSON.stringify
//Q. Create an object, myJSON, with one function, `stringify` that will take one parameter and stringify it like `JSON.stringify` does.
//Object types can be:
// Object
// Array
// Number
// String
// Boolean
var myJSON, thingToStringify;