Skip to content

Instantly share code, notes, and snippets.

View bkase's full-sized avatar

Brandon Kase bkase

View GitHub Profile

Keybase proof

I hereby claim:

  • I am bkase on github.
  • I am bkase (https://keybase.io/bkase) on keybase.
  • I have a public key whose fingerprint is 1322 E170 4A16 0B6B 0886 C5F8 6FE8 5BAA 5615 E495

To claim this, I am signing this object:

@bkase
bkase / fileView.js
Created September 1, 2013 21:48
Ghetto Image Viewer
// Basically a combination of the answers from here: http://stackoverflow.com/questions/7414984/how-could-i-display-x-y-coordinates-on-image-in-real-time-to-the-user-when-the
$(function() {
var tooltip = $( '<div id="coords" style="position: absolute; background-color: white;">' ).appendTo( 'body' )[0];
var imgPos = [];
$( '#the_image' ).
each(function () {
imgPos = [
$(this).offset().left,
@bkase
bkase / Scala.sml
Created January 28, 2013 20:44
Making SML just a little bit more like Scala
datatype 'a Option = None | Some of 'a
@bkase
bkase / Jsson.scala
Last active December 10, 2015 01:48 — forked from kmizu/Jsson.scala
Type-safe concise JSON DSL
import org.json.{JSONObject, JSONArray}
/**
* Forked from https://gist.github.com/1240749
* Modified by bkase
*
* A concise typesafe JSON DSL in Scala.
* When you want to use, only
* import Jsson._ is needed.
* {
@bkase
bkase / main.xml
Created January 18, 2012 23:00
main.xml for cmu mobile apps club (put this in res/layout/)
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
@bkase
bkase / CircleTimeActivity.java
Created January 18, 2012 22:38
CircleTimeActivity from mobile apps club
package org.cmu.mobileappsclub.circletime;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;