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
pointInPoly = (point,poly) -> | |
segments = for pointA, index in poly | |
pointB = poly[(index + 1) % poly.length] | |
[pointA,pointB] | |
intesected = (segment for segment in segments when rayIntesectsSegment(point,segment)) | |
intesected.length % 2 != 0 | |
rayIntesectsSegment = (p,segment) -> | |
[p1,p2] = segment | |
[a,b] = if p1.y < p2.y |
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 iced | |
# Complete jake tasks script for bash | |
# Save it somewhere and then add | |
# complete -C path/to/script -o default jake | |
# to your ~/.bashrc | |
# Bug-fix from Xavier Shay's version | |
# ported from Ruby/Rakefile version https://gist.github.com/cayblood/2499921 | |
# to Node/IcedCoffee/Jakefile by doublerebel | |
# https://gist.github.com/doublerebel/6603667 |
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
// | |
// IPInsetLabel.h | |
// Instapaper | |
// | |
// Created by Marco Arment on 7/23/11. | |
// Copyright 2011 Instapaper LLC, released to the public domain. | |
// | |
#import <UIKit/UIKit.h> |
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
package yourpackage | |
import ( | |
goflag "flag" | |
"fmt" | |
"os" | |
"strings" | |
"testing" | |
flag "github.com/spf13/pflag" |