This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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 |