Skip to content

Instantly share code, notes, and snippets.

View heiths's full-sized avatar

Heith Seewald heiths

View GitHub Profile
@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 / 0_reuse_code.js
Created February 6, 2014 17:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@heiths
heiths / designer.html
Last active August 29, 2015 14:07
designer
<link rel="import" href="../paper-toast/paper-toast.html">
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<polymer-element name="dhs-element">
<template>
<style>
:host {
position: absolute;
@heiths
heiths / designer.html
Last active August 29, 2015 14:13
designer
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../topeka-elements/category-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<polymer-element name="my-element">
<template>
<style>
:host {
@heiths
heiths / .tmux.conf
Last active April 16, 2018 19:29
tmux.conf
# set window split
bind-key v split-window -h
bind-key b split-window
#set -g window-style 'fg=colour247,bg=colour236'
#set -g window-active-style 'fg=colour254,bg=colour235'
set-option -g prefix C-Space
bind-key C-Space last-window
# Start numbering at 1
@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 / .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 / 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