Skip to content

Instantly share code, notes, and snippets.

View hjast's full-sized avatar

Reuben Doetsch hjast

View GitHub Profile
From d171b1842eda04f0bc5c307888b6bd79ce8108b6 Mon Sep 17 00:00:00 2001
From: Charles Comstock <[email protected]>
Date: Fri, 30 Oct 2009 15:47:02 -0500
Subject: [PATCH] added missing cdstdio for vm/util/bert.hpp
---
vm/util/bert.hpp | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/vm/util/bert.hpp b/vm/util/bert.hpp
#APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
require 'rubygems'
require 'sinatra'
require 'haml'
require 'sinatra/dynamicmatic'
class Gsd < Sinatra::Application
#set :root, APP_ROOT
@hjast
hjast / Metrics
Created November 17, 2010 22:59
My shit
One Tab
Note: in their HQ means that the region of domicile and the client rel region of domicile is the same
TABLE A:
MAIN PART
HQ-
Clients globally who have are selling that product in their HQ
---------------------------------------------------------------
Number of unique clients globally with one product over 25K
Sub-
Clients globally who have are selling that product in a sub
@hjast
hjast / API_Game
Created June 26, 2011 06:06
Annoying Code
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
public class API_Game
{
public Long gameID;
public Sport sport;
public GameStatus status;
public API_Facility facility;
public String date;
public String time;
@hjast
hjast / Experiment.scala
Created June 26, 2011 06:07
Test.scala
package com.sportaneous.snippet
import java.util.Calendar
import java.text.SimpleDateFormat
import net.liftweb.http.js.JsCmds.ReplaceOptions._
import com.sportaneous.snippet.SelectValue._
import net.liftweb.http.js.{JE, JsCmd}
import net.liftweb.http.js.JsCmds.After._
import xml.{Null, PrefixedAttribute, NodeSeq}
import net.liftweb.http.{StatefulSnippet, SHtml, S}
@hjast
hjast / BlogPostTest
Created July 15, 2011 03:08
XML code inquiry
<lift:surround with="black-main-column" at="content">
<div class="lift:BlogPostTest">
<lift:bind-at name="side-col">
<lift:surround with="_userfaces">
<lift:bind-at name="title"><span>Members</span></lift:bind-at>
</lift:surround>
</lift:bind-at>
@hjast
hjast / gist:1676825
Created January 25, 2012 15:37
Returned
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
Crunch - Class Schedules
</title><meta http-equiv="Content-Type" content="text/xml; charset=UTF-8" /><meta http-equiv="pragma" content="no-cache" /><meta name="distribution" content="global" /><meta name="revisit-after" content="30 days" /></head>
<body>
<form name="form1" method="post" action="/PdfHandlers/ClassschedulesXML.aspx?facility=110" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJMzQ1MDA4Mzk0ZGSrd5aUvXyb5qo57ejqtV7dFvTSMg==" />
</div>
val cycling = getLabel("Cycling",TopLevelLabel.CYCLING,true)
val hiking = getLabel("Hiking",TopLevelLabel.HIKING,true)
val swimming = getLabel("Swimming",TopLevelLabel.SWIMMING,true)
val running = getLabel("Running",TopLevelLabel.RUNNING,true)
val baseball = getLabel("Baseball",TopLevelLabel.BASEBALL,true)
val basketball = getLabel("Basketball",TopLevelLabel.BASKETBALL,true)
val cricket = getLabel("Cricket",TopLevelLabel.CRICKET,true)
val football = getLabel("Football",TopLevelLabel.TOUCH_FOOTBALL,true)
val hockey = getLabel("Hockey",TopLevelLabel.HOCKEY,true)
val raquetball = getLabel("Raquetball",TopLevelLabel.RACKETBALL,true)
@hjast
hjast / gist:2051815
Created March 16, 2012 18:51
AImport.scala
* Follow this to write other gym import scripts. Import scripts will be faster than a GUI */
object JccImportScript extends ImportScriptDSL
{
import com.sportaneous.dataimport.common.Labels._
import JPAScalaBridge._
val locationID = 370000l
@hjast
hjast / Labels.scala
Created March 16, 2012 18:51
AImport.scala
object Labels {
//This is not used in MINDOBODY
//Induvidual Labels and sub cateogries
val hiking = getLabel("Hiking", TopLevelLabel.HIKING, "HIKING", true)
val swimming = getLabel("Swimming", TopLevelLabel.SWIMMING, "SWIMMING", true)
val running = getLabel("Running", TopLevelLabel.RUNNING, "RUNNING", true)
val baseball = getLabel("Baseball", TopLevelLabel.BASEBALL, "BASEBALL", true)
val basketball = getLabel("Basketball", TopLevelLabel.BASKETBALL, "BASKETBALL", true)
val cricket = getLabel("Cricket", TopLevelLabel.CRICKET, "CRICKET", true)