Skip to content

Instantly share code, notes, and snippets.

View georgemccarthy's full-sized avatar

georgemccarthy

View GitHub Profile
@georgemccarthy
georgemccarthy / MayanToModernDate.lpr
Created September 27, 2015 21:52
Pascal Mayan To Modern Date
program MayanToModernDateND;
uses SysUtils;
var
baktun : integer = 0;
katun : integer = 0;
tun : integer = 0;
uinal : integer = 0;
kin : integer = 0;
@georgemccarthy
georgemccarthy / validate.js
Created September 27, 2015 21:48
JavaScript Form Validation
function validateForm()
{
var result = true;
var msg = "";
var radioOn = "";
var radioCheck = "";
if (document.ExamEntry.name.value=="")
{
msg += "You must enter your name \n";
@georgemccarthy
georgemccarthy / gunscript.cs
Created September 27, 2015 21:45
Unity Game Weapon Script
using UnityEngine;
using System.Collections;
public class GunScript : MonoBehaviour {
public Transform Gun;
public Transform Player;
// Use this for initialization
/*void Start () {
@georgemccarthy
georgemccarthy / check_if_palindrome.py
Created September 27, 2015 21:40
Check if Palindrome
def Palindrome(string):
reversed_string = ""
for i in range(0, len(string)):
reversed_string += string[len(string) -1 - i]
if(string == reversed_string):
return "Is a Palindrome"
else:
return "Is not Palindrome"
print Palindrome(raw_input())
@georgemccarthy
georgemccarthy / calc.java
Created September 27, 2015 21:38
Java Calculator
import java.util.InputMismatchException;
import java.util.Scanner;
public class Main {
static String format(double num1, char operatorChar, double num2, double answer) {
return String.format("%s %s %s = %s", num1, operatorChar, num2, answer);
}
static String operation(double num1, double num2, char operatorChar) {
@georgemccarthy
georgemccarthy / style.css
Created September 27, 2015 21:35
Web Page Template 1 CSS
@font-face {
font-family: MyriadPro-Cond;
src: url('MyriadPro-Cond.otf') /* EOT file for IE */
}
@font-face {
font-family: MyriadPro-Cond;
src: url('MyriadPro-Cond.ttf') /* TTF file for CSS3 browsers */
}
@font-face {
@georgemccarthy
georgemccarthy / index.html
Last active September 27, 2015 21:35
Web Page Template 1 HTML
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body style="margin: 0px;">
<div id="white">
<div class="menu">
@georgemccarthy
georgemccarthy / Main.cpp
Last active September 28, 2015 14:46
SDL Platformer Main
//Written as a combination of Lazy Foo resources, other documentation and original code
//Using SDL and standard IO
#include <SDL.h>
#include <SDL_image.h>
#include <SDL_ttf.h>
#include <stdio.h>
#include <iostream>
#include <time.h>