Skip to content

Instantly share code, notes, and snippets.

@jordoh
jordoh / bootstrap
Last active April 28, 2022 15:44
bootstrapper
#!/bin/bash
# ---------------------------------------------------------------------------
# This script is intended to run in an environment that has nothing useful. It will install a minimal set of software
# to get ansible running, and let ansible take it from there
# ---------------------------------------------------------------------------
REPO_DIR="~/src/bonanza"
eval REPO_DIR=$REPO_DIR
@jordoh
jordoh / entity.lua
Last active May 22, 2022 22:08
Starbound lua API
--- Stubs for entity.* callbacks defined in C++.
--
-- DO NOT INCLUDE this file in your scripts, it is for documentation purposes only.
--
-- Entity callbacks query and mutate the specific entity that is running the
-- lua script. They can be called from a _different_ entity using
-- world.callScriptedEntity(targetEntityId, "entity.*"), replacing "*" with the
-- name of a function defined below.
--
-- Specific types of entities (e.g. NPCs, Objects) define different sets of
@jordoh
jordoh / Index.html
Created January 11, 2012 22:01
knockout.js
<!DOCTYPE HTML>
<html>
<head>
<title>Paragraphs</title>
<link type="text/css" href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.10/themes/humanity/jquery-ui.css" rel="stylesheet" />
<link type="text/css" href="/Content/Stylesheets/Main.css" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js" type="text/javascript"></script>
@jordoh
jordoh / Index.html
Created January 11, 2012 21:41
backbone.js
<!DOCTYPE HTML>
<html>
<head>
<title>Paragraphs</title>
<link type="text/css" href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.10/themes/humanity/jquery-ui.css" rel="stylesheet" />
<link type="text/css" href="/Stylesheets/Main.css" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js" type="text/javascript"></script>
<script src="/Scripts/underscore.js" type="text/javascript"></script>
@jordoh
jordoh / grabcut.patch
Created October 7, 2011 16:17
Patch for grabCut asserts in OpenCV 2.3.1
*** ../modules/imgproc/src/grabcut.cpp 2011-09-12 11:43:02.000000000 -0700
--- ../modules/imgproc/src/grabcut.cpp 2011-10-05 10:59:40.646173736 -0700
***************
*** 119,125 ****
double res = 0;
if( coefs[ci] > 0 )
{
! CV_Assert( covDeterms[ci] > std::numeric_limits<double>::epsilon() );
Vec3d diff = color;
double* m = mean + 3*ci;