Skip to content

Instantly share code, notes, and snippets.

View andrewbredow's full-sized avatar
💭
DJ is not available to answer questions.

Andrew Bredow andrewbredow

💭
DJ is not available to answer questions.
View GitHub Profile
@andrewbredow
andrewbredow / city_aliaser.rb
Last active March 13, 2019 17:27 — forked from cheshire137/city_aliaser.rb
List of aliases for US cities by state
#!/usr/bin/env ruby
require 'rubygems'
require 'mechanize'
require 'json'
url = "https://en.wikipedia.org/wiki/List_of_city_nicknames_in_the_United_States"
STATES = ["Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado",
"Connecticut", "Delaware", "Florida", "Georgia", "Hawaii", "Idaho",
"Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana",
"Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota",
@andrewbredow
andrewbredow / README.txt
Last active February 24, 2022 20:32
README
__________.__
\______ \__|____________________
| ___/ \___ /\___ /\__ \
| | | |/ / / / / __ \_
|____| |__/_____ \/_____ \(____ /
\/ \/ \/
__________
\______ \
| ___/
| |
@andrewbredow
andrewbredow / Filename.md
Last active March 11, 2019 21:00
This is a description

The first file

Here is some text
engines:
csslint:
enabled: true
duplication:
enabled: false
config:
languages:
- ruby
- javascript
- python
@andrewbredow
andrewbredow / controller.rb
Created July 1, 2015 18:10
jQuery UI AutoComplete
class IngredientsController < ApplicationController
def index
@ingredients = if params[:term]
Ingredient.where("name LIKE ?", "%#{params[:term]}%")
else
Ingredient.all.ordered
end
respond_to do |format|
format.html
format.json { render json: @ingredients, root: false }

Keybase proof

I hereby claim:

  • I am andrewbredow on github.
  • I am andrewbredow (https://keybase.io/andrewbredow) on keybase.
  • I have a public key ASAHE6wibDfIb55Fmu8qeDe9qIU-V7goqJUSBPTks9OFwwo

To claim this, I am signing this object:

@andrewbredow
andrewbredow / gist:8231334
Last active January 2, 2016 01:38
What better way to use blank CAH cards than to print up Michigan themed topics! Here's a list of ideas to get started.

Michigan Cards Against Humanity

White Cards

  • The Dutch
  • The Christian Reformed Church
  • Lake Michigan Shrinkage
  • Feeling like Grand Rapids is a cool city during ArtPrize
  • Ordering hot water and smuggling tea bags
  • The elderly
@andrewbredow
andrewbredow / gist:3866712
Created October 10, 2012 16:27 — forked from danielmorrison/gist:3866520
unicode ruby tricks
# encoding: utf-8
module Kernel
define_method "√" do |number|
Math.sqrt(number)
end
end
# Then call:
# √ 5
@andrewbredow
andrewbredow / php_array_map_assoc.php
Created March 21, 2011 16:15
PHP has a really stupid way to access keys when mapping a function to an array
// This works
array_map(function($key, $value) {
var_dump($key);
var_dump($value);
}, array_keys($someArray), $someArray);