Skip to content

Instantly share code, notes, and snippets.

View kamioftea's full-sized avatar

Jeff Horton kamioftea

View GitHub Profile
@kamioftea
kamioftea / example.js
Last active July 29, 2018 18:46
HTML Parsing
var str = '<span class="badge badge-success" style="cursor:default" title="Local Dispatch">L</span>';
var parent = document.createElement("div");
parent.innerHTML = str;
console.log(parent.firstChild.className);
// or with JQuery
console.log($(str).prop('class'));
var keyBuffer = [];
var clear;
jQuery.fn.extend({
insertAtCaret: function(insertText){
return this.each(function(i) {
// if (CKEDITOR.instances[$(document.activeElement).attr('id')] !== undefined)
// {
// CKEDITOR.instances[$(document.activeElement).attr('id')].insertText(insertText)
// } else
@kamioftea
kamioftea / CosmicEncounter.md
Last active June 6, 2017 13:23
Outline of cosmic encounter rules description

Cosmic Encounter

Intro

  • Many Alien species, each player chooses from two
  • Each have a special power on big card, plus related flare card, which significantly alter game
  • Have just discovered warp portals left by ancients, but have little control
  • Aim is to establish 5 foreign colonies first
  • Joint victory is fine
@kamioftea
kamioftea / formExcercise.elm
Created July 13, 2016 12:08
Work from (def shef) elm workshop
import Html exposing (..)
import Html.App as App
import Html.Attributes exposing (..)
import Html.Events exposing (onInput,onClick)
import String
main =
App.beginnerProgram
{ model = model
@kamioftea
kamioftea / keybase.md
Created August 20, 2015 10:44
Keybase Verification

Keybase proof

I hereby claim:

  • I am kamioftea on github.
  • I am kamioftea (https://keybase.io/kamioftea) on keybase.
  • I have a public key whose fingerprint is 42B8 73CD 2DCC 5599 C5C1 E2E1 0099 5863 FA60 E113

To claim this, I am signing this object:

@kamioftea
kamioftea / PHP Overridden Method Body.php.vm
Created March 9, 2015 11:39
Template for overridden getter etc.
#set ($UNDERSCORE_REGEX = "(((?<=[^\\d_])\\d)|((?<=[^A-Z_])[A-Z])|((?<=[A-Z])[A-Z][a-z]))")
#set ($REMOVE_REGEX = "^(get|set|add|remove)_")
#set ($SNAKE_CASE_NAME = $NAME.replaceAll($UNDERSCORE_REGEX, "_$1").replaceAll($REMOVE_REGEX, "").toLowerCase())
#if (${RETURN})
$$SNAKE_CASE_NAME = parent::${NAME}(${PARAM_LIST});
#end
// TODO: Change the autogenerated stub