Skip to content

Instantly share code, notes, and snippets.

View matthewd673's full-sized avatar

Matthew Daly matthewd673

View GitHub Profile
@gsluthra
gsluthra / tree_html5.html
Created August 20, 2012 07:10
Fractal Tree Generation using HTML5 Canvas and Random Numbers
<html>
<head>
<script type="text/javascript">
window.onload = draw;
function draw(){
@matthewd673
matthewd673 / accounts.html
Last active August 29, 2015 14:02
A simple account system
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="da" lang="en">
<head>
<title>Login</title>
</head>
<body>
<script type="text/javascript">
function CheckPassword()
{
var username=document.login.username.value;
anonymous
anonymous / index.html
Created July 4, 2014 13:08
A template to get started with EaselJS.
<!DOCTYPE html>
<html>
<head>
<script src="http://code.createjs.com/easeljs-0.7.0.min.js"></script>
<script>
function init() {
// code here.
}
</script>
</head>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@matthewd673
matthewd673 / Vowels.cs
Last active August 29, 2015 14:15
Farhanalee asked for help on DaniWeb. Here you go, Farhanalee
//Assumed this was a console app
readAString()
{
Console.WriteLine("Type in a word and BE AMAZED!");
string input = Console.ReadLine;
Console.WriteLine(Convert.ToString(countVowels(input)) + " vowels. Now you know!");
Console.ReadKey();
//Not sure how isVowel fits in here but you get the idea
}
@matthewd673
matthewd673 / sprite.cs
Created April 10, 2015 16:15
I'm writing a little game engine in C#, this is the sprite class in it's early stages
//Maybe use Bitmap
private static Image[] frameArray;
public static Image active_frame;
public static int active_frame_number;
public sprite(Image[] frame_array)
{
frameArray = frame_array;
active_frame_number = 0
active_frame = frameArray[active_frame_number];
@matthewd673
matthewd673 / index.html
Created April 11, 2015 14:34
A little thing I made this morning, could be handy for collaborative coding services. Uses codemirror.net
<!DOCTYPE html>
<html>
<head>
<title>codewread</title>
<script src="codemirror-4.10/lib/codemirror.js"></script>
<link rel="stylesheet" href="codemirror-4.10/lib/codemirror.css">
<script src="codemirror-4.10/mode/javascript/javascript.js"></script>
<style>
#comment
{
@matthewd673
matthewd673 / LoadSprites.java
Created May 16, 2015 17:44
A simple class to load images from URLs (used for MiniLD #59)
package com.bitbit.minild59.codes.main;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.URL;
import javax.imageio.ImageIO;
public class LoadSprites
{
@matthewd673
matthewd673 / generator.java
Created July 17, 2015 16:08
A simple dungeon generator for MiniLD 61
public static int[][] rooms = new int[100][100];
public static void generate()
{
Random rndgen = new Random();
for(int i = 0; i <= 99; i++)
{
for(int j = 0; j <= 99; j++)