Skip to content

Instantly share code, notes, and snippets.

View gamingrobot's full-sized avatar
🤖
Doing Stuff

Morgan Creekmore gamingrobot

🤖
Doing Stuff
View GitHub Profile
@gamingrobot
gamingrobot / gist:4755675
Created February 11, 2013 16:52
Get calling class
def _getName(self):
retmod = "Module"
frame, module, line, function, context, index = inspect.stack()[2]
try:
self_argument = frame.f_code.co_varnames[0] # this should be self
instance = frame.f_locals[self_argument]
retmod = instance.__class__.__name__
except IndexError:
retmod = inspect.getmodulename(module)
return retmod
import sys
import HTMLParser
import re
htmlparser = HTMLParser.HTMLParser()
numwords = 2
def main(filename):
with open(str(filename)) as infile:
import sys
import HTMLParser
import re
import MySQLdb
htmlparser = HTMLParser.HTMLParser()
numwords = 2
db = MySQLdb.connect(host="localhost", user="root", passwd="", db="wiki1")
cur = db.cursor()
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <iostream>
// Shader sources
const char* vertexSource =
"#version 150\n"
#!/bin/sh
#
# Shell script that configures gnome-terminal to use monokai.sh theme
# colors. Written for Ubuntu 11.10, untested on anything else.
#
# Monokai theme: https://github.com/oneKelvinSmith/monokai/blob/master/monokai.palette
#
# Adapted from these sources:
# https://gist.github.com/1280177
# http://xorcode.com/guides/solarized-vim-eclipse-ubuntu/
/*
* Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. The rights granted to you under the License
* may not be used to create, or enable the creation or redistribution of,
@gamingrobot
gamingrobot / color.s
Created February 2, 2014 05:56
assembly program for the vexpress-a9 to fill the screen with a color
.arch armv7-a
.fpu neon
.syntax unified
.global _start
_start:
mov r1, $0
movt r1, $0x1002 //Primecell pl111 clcd is mapped to 0x10020000
//setup primecell registers
execute pathogen#infect()
filetype plugin indent on
set number
set autoindent
syntax enable
set background=dark
set t_Co=256
colorscheme molokai
set background=dark
set mouse=a
/*
Attribution: https://bitbucket.org/motdplayer/sm-adplugin/src
Parsing fixed by gamingrobot
*/
#if defined _easyjson_included
#endinput
#endif
#define _easyjson_included
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Slight]
"Colour0"="240,240,240"
"Colour1"="255,255,255"
"Colour2"="63,63,65"
"Colour3"="103,103,103"
"Colour4"="0,0,0"
"Colour5"="0,255,0"
"Colour6"="21,23,26"