This file contains 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 code Copyright (c) 2018 Shane Celis[1] | |
Licensed under the MIT License[2] | |
Original code posted here[3]. | |
This comment generated by code-cite[4]. | |
[1]: https://github.com/shanecelis | |
[2]: https://opensource.org/licenses/MIT | |
[3]: https://gist.github.com/shanecelis/55d2d888cf57ab8ef0a3432456953281 |
This file contains 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
#!/bin/bash | |
# Original code Copyright (c) 2018 Shane Celis[1] | |
# Licensed under the MIT License[2] | |
# | |
# Original code posted here[3]. | |
# | |
# This comment generated by code-cite[4]. | |
# | |
# [1]: https://github.com/shanecelis | |
# [2]: https://opensource.org/licenses/MIT |
This file contains 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 code Copyright (c) 2017 Shane Celis[1] | |
Licensed under the MIT License[2] | |
Original code posted here[3]. | |
This comment generated by code-cite[4]. | |
[1]: https://github.com/shanecelis | |
[2]: https://opensource.org/licenses/MIT | |
[3]: https://gist.github.com/shanecelis/e5d76ead850df257f11a679920a5d851 |
This file contains 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
/* | |
Copyright (c) 2017 Shane Celis | |
Just playing around with some genetic algorithms. | |
*/ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; |
This file contains 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
#!/opt/local/bin/ruby1.8 | |
# | |
# crop-component | |
# | |
# Takes a screenshot of a inspector window from Unity and crops out the largest | |
# component. Useful for generating documentation. | |
# | |
# Original code Copyright (c) 2017 Shane Celis[1] | |
# Licensed under the MIT License[2] |
This file contains 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
Will be here soon. |
This file contains 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
-- Resize Unity Game Window to specified size modulo its header | |
-- | |
-- Modified by Shane Celis @shanecelis based off Paul Calnan's script: | |
-- http://www.paulcalnan.com/archives/2014/10/quicktime-screen-recording-of-a-single-window.html | |
-- clickdrag gist at https://gist.github.com/shanecelis/f0754fbd7d9126b18f83966cd538567b | |
-- XXX Set Unity's desired size here: | |
set desiredSize to {300, 300} | |
set theProcessName to "Unity" |
This file contains 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
/** | |
Search for a method based on generic arguments in addition to name and | |
parameters. Most useful for disambiguating methods with the same name. | |
If the elements of genericArgs are not null, it will return the specialized | |
generic method. Otherwise it will return the generic method definition. | |
Finally, if genericArgs has no elements, it will return a non-generic | |
method. If no method is found, it will return null. | |
e.g. Suppose I had the following methods in a class Minibuffer: |
This file contains 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 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, |