Skip to content

Instantly share code, notes, and snippets.

View granda's full-sized avatar

Matthew granda

View GitHub Profile
@granda
granda / getStateSalesTax.py
Created January 23, 2017 05:55
Outputs sales tax for any five random U.S. states.
# -*- coding: utf-8 -*-
"""
A1 Spec
~~~~~~~
Outputs sales tax for any five random U.S. states.
Example Output:
>> Sales Tax Rates

Keybase proof

I hereby claim:

  • I am granda on github.
  • I am granda (https://keybase.io/granda) on keybase.
  • I have a public key whose fingerprint is DD6D 2470 BBF8 3D0D 2943 DF21 B66D 94DE 2C05 E4F0

To claim this, I am signing this object:

@granda
granda / gist:aaa1c81474ce55f686af
Created August 11, 2014 16:08
Colorize Echo Output
## Colors
# \033[33;31m – Red
# \033[33;32m – Green
# \033[33;33m – Yellow
# \033[33;34m – Blue
# \033[33;35m – Magenta
# \033[33;30m – Gray
# \033[33;36m – Cyan
# \033[0m – No Color
@granda
granda / gist:b60535d2ceb434a2126b
Created July 29, 2014 16:43
UPnP Settings on Verizon Router
- Sadly Verizon hid the UPnP Settings for the MI424WR-GEN3I, here's a direct link to them:
http://10.0.0.1/index.cgi?active_page=900 (swap out the local IP if needed)
@granda
granda / gist:9890890
Last active January 23, 2017 06:27
Create Cronjob for Django Dynamically
from djcelery.models import PeriodicTask, IntervalSchedule
schedule_delta = IntervalSchedule()
schedule_delta.every = 30
schedule_delta.period = 'seconds'
schedule_delta.save()
new_task = PeriodicTask()
new_task.name = "30 Second Interval Task"
new_task.task = "app_name.tasks.name_of_task"