Skip to content

Instantly share code, notes, and snippets.

View johnpneumann's full-sized avatar

John P. Neumann johnpneumann

View GitHub Profile

Keybase proof

I hereby claim:

  • I am johnpneumann on github.
  • I am johnpneumann (https://keybase.io/johnpneumann) on keybase.
  • I have a public key ASAo2MyTYeKLOdVY2nId0BxA2uvwXECJ-Z5dvswKbdOSFAo

To claim this, I am signing this object:

@johnpneumann
johnpneumann / ccurve.py
Created April 5, 2015 03:07
Control Curve Deconstructor
"""
Control Curve Deconstructor
Original file creation date: 2010-09-07
Concept and scripting by John P. Neumann (john@animateshmanimate.com) http://animateshmanimate.com
This work is licensed under the 3-clause BSD ("New BSD License") license.
This is one of the most permissive licenses available, next to the MIT license.
In other words: Use it, Share it, Make it better, Give credit where it's due. Done.
@johnpneumann
johnpneumann / object_creator_tutorial.mel
Last active August 29, 2015 14:18
Maya, QT and You code
/*
object_creator_tutorial
Original file creation date: 2010-07-18
Concept and scripting by John P. Neumann (john@animateshmanimate.com) http://animateshmanimate.com
This work is licensed under the 3-clause BSD ("New BSD License") license.
Licensing information is included in the download.
What is it:
@johnpneumann
johnpneumann / us_states_abbreviated.py
Created April 18, 2013 16:20
Was using django-localflavor-us, but we needed an abbreviated list instead of the US_STATES that comes with it. So I yanked that, recorded a macro in vim and it did the work for me.
ABBR_US_STATES = (
('AL', 'AL'),
('AK', 'AK'),
('AZ', 'AZ'),
('AR', 'AR'),
('CA', 'CA'),
('CO', 'CO'),
('CT', 'CT'),
('DE', 'DE'),
('DC', 'DC'),
@johnpneumann
johnpneumann / generic_msg.py
Created October 25, 2012 14:33
Generic Messaging
"""Generic messaging functions.
.. module:: none
:platform: Unix, Linux
:synopsis: Generic messaging functions
.. moduleauthor:: jneumann
.. usage::
import generic_msg
@johnpneumann
johnpneumann / rand_animal_thing.py
Created August 14, 2012 20:19
Random Animal, Verb, Adjective
"""
Waiting for OSX to install so I did this.
Words from here:
http://dictionary-thesaurus.com/wordlists.html
"""
import sys
import random
import urllib2
@johnpneumann
johnpneumann / list_comps_and_lambdas.py
Created May 7, 2012 04:50
List Comprehensions and Lambdas
"""
Create a new list based upon whether or not the object in the list is a string or not (by utilizing isinstance - if we wanted to only find integers we'd change str to int).
"""
# Lame
my_list = ['a', 'b', 'c', '1', 1, 2, 'd', 'e', '2']
new_list = []
for object in my_list:
if isinstance(object, str):
new_list.append(object)
@johnpneumann
johnpneumann / houdini_clip_creator.py
Created April 2, 2012 19:50
Write out clip file for Houdini from Maya
"""
@author:
John P. Neumann (aka ArrantSquid)
@description:
Writes out a clip file (for use in Houdini) based on maya attributes
passed in.
@usage:
main('some_object', ['scaleX','visibility'], 'some_dir')
@johnpneumann
johnpneumann / a_test.py
Created November 14, 2011 18:20
Class example file
#!/usr/bin/env python
def my_func(a_variable):
"""
Does stuff.
@rtype: bool
@returns: True or False.
"""
@johnpneumann
johnpneumann / avada_kedavra.sh
Created October 12, 2011 15:16
Kill a Linux Process... Harry Potter style
printf '\n\033[0;32;40mAvada Kedavra\n'
killall -9 $1
printf '\033[0;35;40m'
printf '\nKilled the following processes:\n\n'
printf '\033[1;32;40m'
pgrep $1
printf '\n\033[0mDone\n'