Skip to content

Instantly share code, notes, and snippets.

View edprince's full-sized avatar

Ed Prince edprince

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<link href="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.2/css/normalize.min.css" rel="stylesheet" type="text/css" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.2/css/foundation.min.css" rel="stylesheet" type="text/css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.2/js/vendor/modernizr.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.2/js/vendor/jquery.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.2/js/foundation.min.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
@edprince
edprince / fractal-snowflake.py
Last active October 27, 2015 10:23
A recursive algorithm extending the koch snowflake
import turtle
from random import randint
u = 0
turtle.speed(0)
turtle.delay(0)
#turtle.tracer(0, 0)
def koch(x, m):
if x < m:
turtle.forward(x)
@edprince
edprince / index.html
Created July 15, 2015 16:00
Lost index file from Wellacre site
<!DOCTYPE html>
<html>
<head>
<link href='https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.2/css/foundation.min.css' rel='stylesheet' />
<link href='style.css' type='text/css' rel='stylesheet' />
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link href='http://fonts.googleapis.com/css?family=Raleway:400,300, 200' rel='stylesheet' type='text/css'/>
<script src='https://code.jquery.com/jquery-2.1.4.min.js' type='text/javascript'></script>
<script src='main.js' type='text/javascript'></script>
@edprince
edprince / calendar.js
Created July 3, 2015 21:42
Displays events from google calendar
var apiKey = 'AIzaSyBnv4Qew7NmjUUW-7tJ21dBCV7l2-bN_Nc';
var clientId = '837078947181-cua2g11v5hpbgfeaaq8buacdg935t2sj.apps.googleusercontent.com';
var scopes = 'https://www.googleapis.com/auth/calendar';
//Handles authorization
//function called when javascript client library loads
function handleClientLoad() {
var form = document.getElementById('registration');
form.addEventlistener('submit', function() {
if (check()) {
return true;
} else {
return false;
}
});
function check(){
var assert = require('assert');
function validateEmail(email) {
var regex = /.*@.*\..*/;
return email.match(regex);
}
describe('Email Validation', function() {
describe('Types', function() {
it('should be a function', function() {
var assert = require('assert');
function validateEmail(email) {
var regex = /.*@.*\..*/;
return email.match(regex);
}
describe('Email Validation', function() {
describe('Types', function() {
it('should be a function', function() {
var assert = require('assert');
function validateEmail(email) {
var regex = /.*@.*\..*/;
if (email.match(regex) !== null) {
return true;
} else {
return false;
}
}
@edprince
edprince / app.js
Last active August 29, 2015 14:05
Work project
function init() {
document.getElementById("Submit").addEventListener('click', ajax);
}
function ajax() {
console.log("Function started");
request = new XMLHttpRequest();
request.open('GET', 'getData.php', true);
request.onload = function() {
@edprince
edprince / displaydata.php
Created August 21, 2014 13:53
UDP PACKET PRESENTATION #1
<?php
#session_start();
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css"
<link href="index.html">
<link href="displaydatatest.php">