Skip to content

Instantly share code, notes, and snippets.

View programmingthomas's full-sized avatar

Programming Thomas programmingthomas

View GitHub Profile
@chockenberry
chockenberry / gist:11056920
Last active October 22, 2020 19:23
NSFont+SystemFont
//
// NSFont+SystemFont.h
// xScope
//
// Created by Craig Hockenberry on 4/17/14.
//
// Thanks to http://nshipster.com/method-swizzling/
#import <Cocoa/Cocoa.h>
@sontek
sontek / snowjob.py
Created December 22, 2011 04:24
Make your terminal snow with python
#!/usr/bin/env python
import os
import random
import time
import platform
snowflakes = {}
try:
# Windows Support
@stuartjmoore
stuartjmoore / gist:1076642
Created July 11, 2011 19:46
Render Sphere in OpenGL ES for iOS, converted from http://www.codesampler.com/oglsrc/oglsrc_9.htm
void renderSphere(float cx, float cy, float cz, float r, int p)
{
float theta1 = 0.0, theta2 = 0.0, theta3 = 0.0;
float ex = 0.0f, ey = 0.0f, ez = 0.0f;
float px = 0.0f, py = 0.0f, pz = 0.0f;
GLfloat vertices[p*6+6], normals[p*6+6], texCoords[p*4+4];
if( r < 0 )
r = -r;