Skip to content

Instantly share code, notes, and snippets.

@40thieves
40thieves / gist:9630838
Created March 18, 2014 22:09
ACGV Tutorial 4
im = imread('building.tif');
filter_g = fspecial('gaussian', [5, 5], 3);
filter_la = fspecial('laplacian', 0);
img_g = filter2(filter_g, im) / 255;
building_edge = edge(img_g, 'zerocross', filter_la);
imshow(building_edge)
start_stats = regionprops(im_start_label, 'Centroid', 'ConvexArea', 'BoundingBox'); % Returns a set of properties (defined by the arguments passed in)
end_stats = regionprops(im_end_label, 'Centroid', 'ConvexArea', 'BoundingBox');
[start_max_area, start_max_index] = max([start_stats.ConvexArea]);
[end_max_area, end_max_index] = max([end_stats.ConvexArea]);
start_bound_box = start_stats(start_max_index).BoundingBox;
end_bound_box = end_stats(end_max_index).BoundingBox;
@40thieves
40thieves / index.html
Created June 11, 2014 10:46
Clipped avatar CSS
<!DOCTYPE html>
<html>
<head>
<title>Avatar CSS</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<h1>Avatar CSS</h1>
### Keybase proof
I hereby claim:
* I am 40thieves on github.
* I am fortythieves (https://keybase.io/fortythieves) on keybase.
* I have a public key whose fingerprint is DA4E 99E9 0D34 3E34 0C5C 1BF7 1856 B711 4FC5 633F
To claim this, I am signing this object:
@40thieves
40thieves / README.md
Created May 19, 2015 20:55
System.js async loader plugin

Usage

To asynchronously load Google maps:

config.js:

System.config({
	"paths": {
		"maps": "google-maps-url"
	}
@40thieves
40thieves / index.js
Last active August 29, 2015 14:24 — forked from sahrens/React Native: Animated - Code
React Native: Animated - Code
/***
* The examples provided by Facebook are for non-commercial testing and
* evaluation purposes only.
*
* Facebook reserves all rights not expressly granted.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
@40thieves
40thieves / index.html
Created April 30, 2013 19:46
Super simple css animation for adding some interest to loading screens
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="utf-8" />
<meta name="description" content="" />
<meta name="author" content="Alasdair Smith" />
<link rel="stylesheet" href="style.css" />
</head>
@40thieves
40thieves / Default (OSX).sublime-keymap
Last active December 27, 2015 18:29
My preferred Sublime Text keybindings
[
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" },
{
"keys": ["ctrl+shift+l"],
"command": "insert_snippet",
"context": [{
"key": "selector",
"operator": "equal",
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>Animated WebGL Scene with Key and Mouse Input.</title>
<meta charset="utf-8">
<script src="lib/webgl-debug.js"></script>
<script type="text/javascript" src="lib/glMatrix.js"></script>
<script src="lib/webgl-utils.js"></script>
// This is a bug - the compiler will interpret this as: `return; foo;`
return
'foo';
// This is also a bug - the compiler will interpret this as `return; foo;`
return
'foo'