Skip to content

Instantly share code, notes, and snippets.

View jefftriplett's full-sized avatar
Living the dream

Jeff Triplett jefftriplett

Living the dream
View GitHub Profile
@jefftriplett
jefftriplett / trello-to-newsletter.py
Last active June 5, 2021 17:00
Trello to Newsletter builder
"""
Trello to Newsletter builder
This is heavily inspired by: https://changelog.com/trello-as-a-cms/
To install:
pip install click cached_property markdown py-trello
To run:
export TRELLO_APP_KEY=''
@jefftriplett
jefftriplett / guess_gender.py
Created May 28, 2015 22:07
This script takes a list of names and determines their gender.
"""
To install:
pip install click requests requests_cache
To run:
python guess_gender.py list-of-names.txt
"""
import click
@jefftriplett
jefftriplett / registration-open.md
Last active August 29, 2015 14:21
DjangoCon US Registration is open!

DjangoCon US Registration is open!

Registration is open! You may book your tickets and reserve your hotel accommodations for DjangoCon US!

We’ve worked hard to lower ticket prices this year, and thus have low prices for students and individuals. Financial assistance is also available to those with limited budgets.

Register for Djangocon 2015 here.

Reserve your hotel accommodation to take advantage of our discounted room rates. This year the daily room rate for single or double occupancy is $139. Please use the reservation code of DJANGO0915.

@jefftriplett
jefftriplett / favorite-tv-shows.md
Last active August 29, 2015 14:21
My Favorite TV Shows of 2014

Jeff's Favorite TV Shows of 2014

Best:

  • Fargo
  • True Detective
  • Transparent
  • Lillyhammer
  • Top of the Lake
  • Black Mirror
@jefftriplett
jefftriplett / djangocon-talk-ideas.md
Last active April 1, 2016 15:10
DjangoCon Talks Ideas
"""
Originaly code was taken from: http://djangosnippets.org/snippets/290/
But I was made some improvements like:
- print URL from what queries was
- don't show queries from static URLs (MEDIA_URL and STATIC_URL, also for /favicon.ico).
- If DEBUG is False tell to django to not use this middleware
- Remove guessing of terminal width (This breaks the rendered SQL)
"""
from clint.textui import colored, columns, indent, puts
### Keybase proof
I hereby claim:
* I am jefftriplett on github.
* I am jefftriplett (https://keybase.io/jefftriplett) on keybase.
* I have a public key whose fingerprint is B2E0 9BFC 00DD 3C24 B05F A80D 341C A25B 11B1 4EC6
To claim this, I am signing this object:
@jefftriplett
jefftriplett / url2markdown-cli.py
Last active August 29, 2015 14:13
Fetch a url and translate it to markdown in one command. Formally moved to: https://github.com/jefftriplett/url2markdown-cli
"""
Copyright (c) 2015, Jeff Triplett
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
@jefftriplett
jefftriplett / invoke.coffee
Created December 22, 2014 16:33
Hubot + Invoke (python)
# Description:
# Run invoke commands.
#
# Commands:
# hubot invoke <subcommand>
{spawn, exec} = require 'child_process'
module.exports = (robot) ->
# Deploy to staging
@jefftriplett
jefftriplett / spiked-cider.py
Last active August 29, 2015 14:08
Dump your homebrew config into a cider (https://github.com/msanders/cider) compatible json format
import click
import json
import subprocess
def run_command(cmd, as_list=True):
try:
output = subprocess.check_output(
cmd,
stderr=subprocess.STDOUT,