Skip to content

Instantly share code, notes, and snippets.

Avatar

Shane Celis shanecelis

View GitHub Profile
View 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)
View clickdrag.swift
#!/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 — forked from branan/gist:1562391
Example OpenGL3.2 buffer/shader usage
View gist:2779930
/*
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
You can’t perform that action at this time.