Skip to content

Instantly share code, notes, and snippets.

View briandailey's full-sized avatar

Brian Dailey briandailey

View GitHub Profile
parseInt('10', 0)
10
parseInt('10', 1)
NaN
parseInt('10', 2)
2
@briandailey
briandailey / gist:4466815
Created January 6, 2013 12:26
channels in nashville
[06:25:19] byeliad: list * -topic *nashville*
[06:25:20] -alis- Returning maximum of 60 channel names matching '*'
[06:25:20] -alis- #hacknashville 11 :Welcome to hacknashville
[06:25:20] -alis- #nashdl 46 :Talk about Nashville, Dynamic Languages, or Both: Thursday is JJ's Cafe/Broadway Brewhouse; also, we dream of weekly Saturday morning nashdl (coding!) brunch starting at 10or11:am at Frothy Monkey; Sundays coding at 10am at PB east; also, fuck flash & bundler.
[06:25:20] -alis- #nashvillephp 14 :Nashville PHP User Group • http://nashvillephp.org/ • We meet the second Tuesday of each month at 6pm • Join our discussion forums: http://forum.nashvillephp.org/ • Follow us on Twitter: @NashvillePHP
[06:25:20] -alis- #nlug 19 :Nashville Linux User Group | nlug.org
[06:25:20] -alis- #phpcon 3 :PHP Co
@briandailey
briandailey / gist:4443624
Created January 3, 2013 13:55
cycling an uninstantiated class variable
>>> from itertools import cycle
>>> class Foo(object):
... c = cycle(['1', '2'])
...
>>> Foo.c
<itertools.cycle object at 0x1004690e0>
>>> Foo.c.next()
'1'
>>> Foo.c.next()
'2'
~ /usr/games/cowsay -f turtle "What."
_______
< What. >
-------
\ ___-------___
\ _-~~ ~~-_
\ _-~ /~-_
/^\__/^\ /~ \ / \
/| O|| O| / \_______________/ \
| |___||__| / / \ \
@briandailey
briandailey / leap_year.py
Created September 27, 2012 19:58
method to check a year to see if it's a leap year.
is_leap_year = lambda x: x % 400 == 0 or (x % 100 != 0 and x % 4 == 0)
@briandailey
briandailey / cheap-data-plans.md
Created August 29, 2012 17:04
Cheap plans with unlimited* data, minutes, and text.

Problem

I need a data plan that my wife and I both use, and I don't want to pay more than $100 a month for both. Family plans are a rip-off - even with a limited number of minutes the cheapest I've found for two smartphones is about $120 a month. At a two year contract, that hits nearly $3000. What can I say, I'm a tightwad.

Solution

Pre-paid plans on pre-pay networks.

What You Need To Know

If you've always gone with the big boys (AT&T or Verizon) you probably don't even know about these pre-paid plans. Some of them are even subsidiries of the bigger companies, but they don't advertise them much.


Hey Brian, I wanted to introduce myself as I'm launching a grocery shopping venture and in need of a talented PHP (LAMP) developer who can work with the Zend framework, MySQL, and Google Maps and Facebook API. The site is on a Linux server, running on an Amazon EC2.

Our beta site is currently in QA but my relationship with my developer went sour so I'm looking to transition the project to another developer to help me finalize the site and launch the prototype. This venture is totally bootstrapped so I have no more than a $4K budget remaining to pay someone as a work-for-hire OR find myself a tech co-founder (strictly for equity) to help grow the business for the next 12 months. Over the last several months, I've gotten about 6 businesses to sign up and several other (larger) retailers have expressed interested so I'm starting to get the business idea validated…which is great news.

The beta site is currently in QA (and in production mode) and I would say it's about 80% complete but the front-end has i

@briandailey
briandailey / gist:2158466
Created March 22, 2012 13:52
Pandas = Magic.
from pandas import read_csv
df = read_csv('all_hospitals.csv')
def by_hcpcs_code():
hcpcs_table = {}
grouped_by_upin = df.groupby('PUF_PROVIDER_NUMBER')
for upin, by_upin in grouped_by_upin:
hcpcs_table.setdefault(upin, {})
$ brew install glib
==> Downloading ftp://ftp.gnome.org/pub/gnome/sources/glib/2.28/glib-2.28.8.tar.bz2
File already downloaded in /Users/brian/Library/Caches/Homebrew
==> Downloading patches
######################################################################## 100.0%
######################################################################## 100.0%
######################################################################## 100.0%
######################################################################## 100.0%
######################################################################## 100.0%
######################################################################## 100.0%
@briandailey
briandailey / dev.md
Last active July 5, 2021 22:35
Stratasan: Senior Software Developer

Become a Stratanaut!

Who We Are

Stratasan is a Nashville-based company that provides intelligence on healthcare markets to hospital strategists, physician offices, community care experts, and others. We aggregate healthcare data, curate it, and provide reports and tools that aid healthcare decision-making. As an example, we give guidance to our clients looking to place a new acute care clinic.