Skip to content

Instantly share code, notes, and snippets.

View shanecelis's full-sized avatar

Shane Celis shanecelis

View GitHub Profile
@shanecelis
shanecelis / is-prime.shen
Last active February 16, 2017 05:07 — forked from deech/is-prime.shen
(datatype is-prime
if (is-prime? N)
N : number;
==============
N : prime;)
(define is-prime?
2 -> true
X -> (prime* X (/ X 2) 2) where (number? X)
_ -> false)
#!/usr/bin/env xcrun swift
// ~/bin/clickdrag -x 10 -y 20 -dx 200 -dy 100
// http://www.paulcalnan.com/archives/2014/10/quicktime-screen-recording-of-a-single-window.html
import Foundation
let kDelayUSec : useconds_t = 500_000
func DragMouse(from p0: CGPoint, to p1: CGPoint) {
let mouseDown = CGEvent.init(mouseEventSource:nil,
mouseType:.leftMouseDown,
@shanecelis
shanecelis / gist:2779930
Created May 24, 2012 07:01 — forked from branan/gist:1562391
Example OpenGL3.2 buffer/shader usage
/*
Original: 1562391 by branan
Updated to use GLFW so it works on Mac OS X Lion
*/
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#define GLFW_NO_GLU
#define GLFW_INCLUDE_GL3