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 | |
# Usage: | |
# ./search_github.sh "some query" "my-org" "my-token" | vi - | |
# Define the search query | |
search_query="$1" | |
org="$2" | |
token="$3" |
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
import sys, getopt, os | |
from osgeo import ogr, gdal | |
def main(argv): | |
inputfile = '' | |
outputfile = '' | |
point = '' | |
try: | |
opts, args = getopt.getopt(argv, "hi:o:p:", ["input=", "output=", "point="]) | |
except getopt.GetoptError: |
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
import PlaygroundSupport | |
PlaygroundPage.current.needsIndefiniteExecution = true | |
import UIKit | |
func bind<T, U, V>(_ first: (T) -> U, _ second: (U) -> V) -> (T) -> V { | |
return { (input: T) in | |
let res = first(input) | |
return second(res) |
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
require "pathname" | |
class XCAsset | |
def initialize(path, is_root) | |
@path = path | |
@is_root = is_root | |
name = @path.split.last | |
@is_container = !(name.to_s =~ /\.imageset$/) |
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
// | |
// MKPolygon+Containment.h | |
// Pods | |
// | |
// Created by Robin Goos on 28/04/15. | |
// | |
// | |
#import <MapKit/MapKit.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
#import <Foundation/Foundation.h> | |
@interface GOFilteringURLCache : NSURLCache | |
- (void)addFilterForURL:(NSURL *)URL response:(NSCachedURLResponse *(^)(NSURLRequest *request))responseBlock; | |
- (void)removeFiltersForURL:(NSURL *)URL; | |
@end |
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
// | |
// UIView+EnableUserInteraction.h | |
// Pods | |
// | |
// Created by Robin Goos on 06/06/14. | |
// | |
// | |
#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
// | |
// DateAdditions.swift | |
// OMGSWIFT | |
// | |
// Created by Robin Goos on 03/06/14. | |
// Copyright (c) 2014 OMG. All rights reserved. | |
// | |
import Foundation |
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
function realTypeName (obj) { | |
if (obj === null) { | |
return "null"; | |
} | |
if (obj === void(0)) { | |
return "undefined"; | |
} | |
var t = typeof obj; | |
switch(t) { | |
case "function": |
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
(function (JShoop, $, window) { | |
function test_origin(url) { | |
var loc = window.location, | |
a = document.createElement('a'); | |
a.href = url; | |
var cors = (a.hostname == loc.hostname && | |
a.port == loc.port && |
NewerOlder