Skip to content

Instantly share code, notes, and snippets.

@kmazanec
kmazanec / client.html
Last active May 13, 2016 16:01
Web socket chat server
<html>
<!-- Forked from a JSFiddle, available here: http://jsfiddle.net/rxcwyypv/2/ -->
<head>
<title>WebSocket Echo Test</title>
<script>
function init() {
websocket = new WebSocket("ws://localhost:8080/read");
websocket.onopen = function() { document.getElementById("output").innerHTML += "<p>> CONNECTED</p>"; };

Question

LIFE EXPERIENCES

  • Tell us about an experience from your life that has influenced your development as a person.

  • Describe your most meaningful achievement that has made an impact in your community

  • Tell us about something you have learned from someone who is very different from you?

@kmazanec
kmazanec / carousel.js
Last active December 24, 2015 00:49 — forked from ksolo/carousel.js
Image Carousel
@kmazanec
kmazanec / form-validator.js
Created September 26, 2013 19:12 — forked from ksolo/form-validator.js
Form Validation
// shorthand for $(document).ready();
$(function(){
//Your code...
});
@kmazanec
kmazanec / form-validator.js
Last active December 24, 2015 00:40 — forked from ksolo/form-validator.js
Form Validation
// shorthand for $(document).ready();
function verifyEmail (email) {
var em_re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return em_re.test(email);
}
$(function(){
@kmazanec
kmazanec / zoo.html
Last active December 24, 2015 00:29 — forked from dbc-challenges/zoo.js
<!DOCTYPE html>
<html lang="en">
<head>
<!--
normalize.css removes cross-browser differences in defaults, e.g.,
differences in how form elements appear between Firefox and IE
See: http://necolas.github.com/normalize.css/
-->
<!--
application.css is where you put your styles
@kmazanec
kmazanec / index.html
Last active December 24, 2015 00:19 — forked from dbc-challenges/index.html
DBC Phase 2 Practice Assessment Part 3
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css">
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css">
</head>
/* Here is your chance to take over Socrates!
Spend 10 minutes on each of the following hacks to the Socrates website.
Enter them in the console to make sure it works and then save
your results here.
Choose a new pair for each. Add your names to the section you complete.
*/
@kmazanec
kmazanec / .bash_profile
Created September 15, 2013 00:41
My current .bash_profile. The "today" function will make getting to the right folder much easier. Simply type "today" on the command line.
function parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
function today () {
today=$(date +"%m%d")
# Modify the line below to your local dropbox path from ~
# Ex: /Users/Keith/Dropbox/Fireflies/Keith
@kmazanec
kmazanec / methods_and_recursion.rb
Last active December 22, 2015 04:28
Portfolio 1: Methods and Recursion
# Create a dictionary of english words mapped to number values
# Take in a number
# Start with the largest value in the dictionary, see if the number is evenly divisible by it
# IF it is, then add that word to the method called on the number with the value of the word divided out
# Return the string