Skip to content

Instantly share code, notes, and snippets.

View heiths's full-sized avatar

Heith Seewald heiths

View GitHub Profile
@heiths
heiths / vtxselect.py
Last active December 20, 2015 05:49
pymel vert selection example
from pymel.core import *
ball = polySphere()[0]
bs = ball.getShape()
#Basic selection
select([i for i in bs.vtx if i.getPosition().y >= 0])
#more interesting things:
@heiths
heiths / cities_without_a.py
Created October 10, 2013 02:10
quick list of texas cities without letter A
from bs4 import BeautifulSoup
import requests
r = requests.get('http://en.wikipedia.org/wiki/List_of_cities_in_Texas')
soup = BeautifulSoup(r.text)
links = soup.find_all('li')
cities = []
for i in links:
try:
@heiths
heiths / import_check.py
Created November 29, 2013 01:37
A simple way to search for and get info about a script.
import os
import sys
def main(script_name=None):
g = globals()
#pass it a value or get a prompt. Example: file_name.py
script_name = raw_input("Name of the file:\n#") if script_name is None else script_name
base_name = script_name.split('.')[0]
@heiths
heiths / .gitconfig
Last active March 15, 2017 15:30 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Heith Seewald
email = heiths@gmail.com
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[push]
default = matching
[color]
@heiths
heiths / .gitattributes
Last active March 31, 2017 20:10
.gitattributes for Unity3D with git-lfs
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.anim merge=unityyamlmerge eol=lf
*.asset merge=unityyamlmerge eol=lf
*.controller merge=unityyamlmerge eol=lf
*.mat merge=unityyamlmerge eol=lf
@heiths
heiths / saio-install.sh
Last active August 17, 2017 22:33
Swift all in one (SAIO) installer
#!/usr/bin/env bash
# Make sure we’re running with root permissions.
if [ ${USER} != root ]; then
echo Please run this script using sudo
exit
fi
# Make ubuntu is > 16.10
if [ ${USER} != root ]; then
from socket import socket
from OpenSSL import SSL
def callback(conn, cert, errno, depth, result):
if depth == 0 and (errno == 9 or errno == 10):
return False # or raise Exception("Certificate not yet valid or expired")
return True
@heiths
heiths / rax.py
Created January 23, 2018 04:44
rax.py ansible inventory script that works in Ansible 2.4
#!/usr/bin/env python
# (c) 2013, Jesse Keating <jesse.keating@rackspace.com,
# Paul Durivage <paul.durivage@rackspace.com>,
# Matt Martz <matt@sivel.net>
#
# This file is part of Ansible.
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@heiths
heiths / safer_docker_install.sh
Last active March 2, 2018 03:55
safe_docker_install.sh
#!/bin/sh
set -e
# This script is meant for quick & easy install via:
# $ curl -fsSL get.docker.com -o get-docker.sh
# $ sh get-docker.sh
#
# For test builds (ie. release candidates):
# $ curl -fsSL test.docker.com -o test-docker.sh
# $ sh test-docker.sh
@heiths
heiths / Dockerfile
Last active March 7, 2018 09:50
run with: docker-compose -f poppy-compose.yaml up
##
## Poppy
##
##
FROM ubuntu:14.04
MAINTAINER Amit Gandhi <amit.gandhi@rackspace.com>
RUN apt-get -qq update
RUN apt-get -qq upgrade