Skip to content

Instantly share code, notes, and snippets.

Avatar
🎮
writing games

Frank Hale frankhale

🎮
writing games
  • Clearwater, Florida
View GitHub Profile
@frankhale
frankhale / main.cljs
Last active Aug 29, 2015
My first attempt to port the main.js of the Hello, World atom-shell application to Clojurescript. This does not currently work because atom-shell thinks my application is invalid.
View main.cljs
(ns main.core)
(def app (js/require "app"))
(def browser-window (js/require "browser-window"))
(def crash-reporter (js/require "crash-reporter"))
(def main-window (atom nil))
(defn init-browser []
(reset! main-window (browser-window. (clj->js {:width 800 :height 600})))
@frankhale
frankhale / index.html
Last active Aug 29, 2015
Atom-Shell: setting input focus test
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Focus Test</title>
</head>
<body>
<input id="test1" type="text" value="" />
<input id="test2" type="text" value="" />
<input id="test3" type="text" value="" />
@frankhale
frankhale / answer-question-on-google-plus.cs
Last active Aug 29, 2015
Answer to a question on Google+
View answer-question-on-google-plus.cs
string[] names = { "Al Dente", "Anna Graham", "Earle Bird", "Ginger Rayle", "Iona Ford" };
int i = 0;
while (i < names.Length)
{
Console.WriteLine(names[i]); // need to use 'i' to index into the array
i++; // need to increment 'i'
}
View HelloWorld.cs
using System;
namespace Hello
{
class World
{
static void Main(string[] args)
{
Console.WriteLine("Hello,World!");
}
@frankhale
frankhale / Title.cs
Created Mar 14, 2011
Title class and list getter
View Title.cs
public class Title
{
public string Name { get; set; }
public int ID { get; set; }
}
...
public List<Title> populateTitle()
{
@frankhale
frankhale / questions.xml
Created May 3, 2011
Exam Assistant Question datafile format
View questions.xml
<?xml version="1.0" encoding="utf-8" ?>
<questions>
<question>
<text>The text of the question goes here</text>
<answers>
<answer correct="true">This is the answer</answer>
<answer correct="false">Answer 2</answer>
<answer correct="false">Answer 3</answer>
<answer correct="false">Answer 4</answer>
</answers>
@frankhale
frankhale / Wiki.cs
Created Sep 21, 2011
Autumn controller sample
View Wiki.cs
namespace Wiki.Controllers
{
public class DataConnector : IBoundActionObject
{
public WikiDataClassesDataContext DB { get; internal set; }
public void ExecuteBeforeAction()
{
DB = new WikiDataClassesDataContext();
}
@frankhale
frankhale / test.cs
Created Oct 2, 2011
Hello World from Montauk
View test.cs
using Montauk;
public class App : MontaukApplication
{
public App()
{
Get["/Index"] = (args) =>
{
ViewTags["message"] = "Hello, World!";
@frankhale
frankhale / index.html
Created Nov 7, 2011
Montauk Hello,World - Index view
View index.html
%%Master=App%%
{{message}}
@frankhale
frankhale / app.html
Created Nov 7, 2011
Montauk Hello,World - master view
View app.html
<!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>Hello, World!</title>
</head>
<body>
%%View%%
</body>
</html>