diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4ac98da --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +Gemfile.lock +*.swp +_site/ diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..1dff337 --- /dev/null +++ b/Gemfile @@ -0,0 +1,2 @@ +source 'http://rubygems.org' +gem 'github-pages' diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..85daa77 --- /dev/null +++ b/_config.yml @@ -0,0 +1,3 @@ +name: Your New Jekyll Site +markdown: redcarpet +pygments: true diff --git a/_layouts/default.html b/_layouts/default.html new file mode 100644 index 0000000..3c0837f --- /dev/null +++ b/_layouts/default.html @@ -0,0 +1,44 @@ + + + + + + {{ page.title }} + + + + + + + + + + + +
+
+

{{ site.name }}

+ home +
+ + {{ content }} + + +
+ + + diff --git a/_layouts/home.html b/_layouts/home.html new file mode 100644 index 0000000..a6b670c --- /dev/null +++ b/_layouts/home.html @@ -0,0 +1,36 @@ + + + + + + {{ page.title }} + + + + + + + + + + + + + + + + + + + + + + +
+ {{ content }} +
+ + diff --git a/_layouts/post.html b/_layouts/post.html new file mode 100644 index 0000000..04e3586 --- /dev/null +++ b/_layouts/post.html @@ -0,0 +1,9 @@ +--- +layout: default +--- +

{{ page.title }}

+

{{ page.date | date_to_string }}

+ +
+{{ content }} +
diff --git a/_posts/2014-04-24-welcome-to-jekyll.markdown b/_posts/2014-04-24-welcome-to-jekyll.markdown new file mode 100644 index 0000000..cd5ec64 --- /dev/null +++ b/_posts/2014-04-24-welcome-to-jekyll.markdown @@ -0,0 +1,24 @@ +--- +layout: post +title: "Welcome to Jekyll!" +date: 2014-04-24 18:53:43 +categories: jekyll update +--- + +You'll find this post in your `_posts` directory - edit this post and re-build (or run with the `-w` switch) to see your changes! +To add new posts, simply add a file in the `_posts` directory that follows the convention: YYYY-MM-DD-name-of-post.ext. + +Jekyll also offers powerful support for code snippets: + +{% highlight ruby %} +def print_hi(name) + puts "Hi, #{name}" +end +print_hi('Tom') +#=> prints 'Hi, Tom' to STDOUT. +{% endhighlight %} + +Check out the [Jekyll docs][jekyll] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll's GitHub repo][jekyll-gh]. + +[jekyll-gh]: https://github.com/mojombo/jekyll +[jekyll]: http://jekyllrb.com diff --git a/blog/index.html b/blog/index.html new file mode 100644 index 0000000..d4c73f0 --- /dev/null +++ b/blog/index.html @@ -0,0 +1,13 @@ +--- +layout: default +title: Tyler Hallada +--- + +
+

Blog Posts

+ +
diff --git a/css/ClearSans-Thin-webfont.eot b/css/ClearSans-Thin-webfont.eot new file mode 100644 index 0000000..e5591e6 Binary files /dev/null and b/css/ClearSans-Thin-webfont.eot differ diff --git a/css/ClearSans-Thin-webfont.svg b/css/ClearSans-Thin-webfont.svg new file mode 100644 index 0000000..25b3d9a --- /dev/null +++ b/css/ClearSans-Thin-webfont.svg @@ -0,0 +1,667 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/css/ClearSans-Thin-webfont.ttf b/css/ClearSans-Thin-webfont.ttf new file mode 100644 index 0000000..54c6f3e Binary files /dev/null and b/css/ClearSans-Thin-webfont.ttf differ diff --git a/css/ClearSans-Thin-webfont.woff b/css/ClearSans-Thin-webfont.woff new file mode 100644 index 0000000..7572724 Binary files /dev/null and b/css/ClearSans-Thin-webfont.woff differ diff --git a/css/main.css b/css/main.css new file mode 100755 index 0000000..5ad0fec --- /dev/null +++ b/css/main.css @@ -0,0 +1,353 @@ +/*****************************************************************************/ +/* +/* Common +/* +/*****************************************************************************/ + +/* Box sizing. Courtesy of Paul Irish + * (http://www.paulirish.com/2012/box-sizing-border-box-ftw/) */ +*, *:before, *:after { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} + +/* Global Reset */ +/** {*/ + /*margin: 0;*/ + /*padding: 0;*/ +/*}*/ + +/*makes the page overflow, so commenting out for now*/ +/*html, body { height: 100%; }*/ + +/*body {*/ + /*background-color: #FFF;*/ + /*font: 13.34px Helvetica, Arial, sans-serif;*/ + /*font-size: small;*/ + /*text-align: center;*/ +/*}*/ + +/*h1, h2, h3, h4, h5, h6 {*/ + /*font-size: 100%; }*/ + +/*h1 { margin-bottom: 1em; }*/ +/*p { margin: 1em 0; }*/ + +/*a { color: #00a; }*/ +/*a:hover { color: #000; }*/ +/*a:visited { color: #a0a; }*/ + +/*****************************************************************************/ +/* +/* Grid +/* +/*****************************************************************************/ + +/* Grid. Courtesy of Adam Kaplan (http://www.adamkaplan.me/grid/) */ +.container { + margin: 0 auto; + max-width: 48rem; + width: 90%; +} + +@media (min-width: 40rem) { + .column { + float: left; + padding-left: 1rem; + padding-right: 1rem; + } + + .column.full { width: 100%; } + .column.two-thirds { width: 66.7%; } + .column.half { width: 50%; } + .column.third { width: 33.3%; } + .column.fourth { width: 25%; } + .column.three-fourths { width: 75%; } + .column.flow-opposite { float: right; } +} + +.clearfix:before, +.clearfix:after { + content: " "; + display: table; +} + +.clearfix:after { + clear: both; +} + +.clearfix { + *zoom: 1; +} + +@media (min-width: 40rem) { + .column.flow-opposite { float: right; } +} + +/* More suggestions from Jorden Lev (http://jordanlev.github.io/grid/) */ +@-webkit-viewport {width: device-width;} +@-moz-viewport {width: device-width;} +@-ms-viewport {width: device-width;} +@-o-viewport {width: device-width;} +@viewport {width: device-width;} + +img { width: auto; max-width: 100%; height: auto; } + +/* By me */ +.hide-mobile { + display: none; +} + +@media (min-width: 40rem) { + .hide-desktop { display: none } + .hide-mobile { } +} + +/*****************************************************************************/ +/* +/* Home +/* +/*****************************************************************************/ +.posts { + list-style-type: none; + margin-bottom: 2em; +} + +.posts li { + line-height: 1.75em; +} + +.posts span { + color: #aaa; + font-family: Monaco, "Courier New", monospace; + font-size: 80%; +} + +/*****************************************************************************/ +/* +/* Site +/* +/*****************************************************************************/ + +.site { + font-size: 115%; + text-align: justify; + width: 42em; + margin: 3em auto 2em; + line-height: 1.5em; +} + +.header a { + font-weight: bold; + text-decoration: none; +} + +.title { + display: inline-block; + margin-bottom: 2em; +} + +.title a { + color: #a00; +} + +.title a:hover { + color: #000; +} + +.header a.extra { + color: #aaa; + margin-left: 1em; +} + +.header a.extra:hover { + color: #000; +} + +.meta { + color: #aaa; +} + +.footer { + font-size: 80%; + color: #666; + border-top: 4px solid #eee; + margin-top: 2em; + overflow: hidden; +} + +.footer .contact { + float: left; + margin-right: 3em; +} + +.footer .contact a { + color: #8085C1; +} + +.footer .rss { + margin-top: 1.1em; + margin-right: -.2em; + float: right; +} + +.footer .rss img { + border: 0; +} + +/*****************************************************************************/ +/* +/* Posts +/* +/*****************************************************************************/ + +/* standard */ +.post pre { + border: 1px solid #ddd; + background-color: #eef; + padding: 0 .4em; +} + +.post ul, .post ol { + margin-left: 1.35em; +} + +.post code { + border: 1px solid #ddd; + background-color: #eef; + padding: 0 .2em; +} + +.post pre code { + border: none; +} + +/* terminal */ +.post pre.terminal { + border: 1px solid #000; + background-color: #333; + color: #FFF; +} + +.post pre.terminal code { + background-color: #333; +} + +/*****************************************************************************/ +/* +/* Homepage +/* +/*****************************************************************************/ + +#home { + font-family: 'Open Sans', Arial, sans-serif; + color: #444; + display: block; + position: relative; + padding-top: 1.5rem; +} + +/* credit to http://codepen.io/bennettfeely/pen/Ftczh for a lot of this css */ + +.card { + position: relative; + z-index: 2; + padding: 1rem; + box-shadow: 0 1px 2px #aaa; + background: white; + margin: 0 1rem 1rem; + border-radius: 3px; + user-select: none; +} + +html { + width: 100%; + height: 100%; +} + +h1 { + font-size: 2rem; + font-weight: 200; + margin-top: 0; + text-align: center; +} + +strong { + font-weight: 400; + color: FireBrick; +} + +h2 { + font-size: .9rem; + line-height: 2.5; + color: gray; + font-weight: 400; +} + +hr { + width: 75%; +} + +a { + color:FireBrick; + text-decoration: none; +} + +a:visited { + color:#663366; +} + +a:hover { + color:FireBrick; + text-decoration: underline; +} + +canvas { + position: fixed; + top: 0; + left: 0; +} + +blockquote { + margin-left: 20px; + margin-right: 20px; + padding-left: 1rem; + border-left: solid 3px #aaa; +} + +blockquote p { + margin-bottom: 6px; +} + +#front-quote , #front-quote, p { + margin-top: 0; + margin-bottom: 0; +} + +.profile-card-portrait { + width: 100%; + margin-bottom: 1.5rem; +} + +.profile-card-quote { + margin-top: 1.5rem; +} + +.profile-card-portrait img { + margin: 0 auto; + display: block; +} + +.profile-card-desc { + margin-top: 1.25rem; +} + +@media (min-width: 40rem) { + .profile-card-portrait { + margin-bottom: 0; + } + .profile-card-links { + margin-top: 0; + } +} diff --git a/css/normalize.css b/css/normalize.css new file mode 100644 index 0000000..08f8950 --- /dev/null +++ b/css/normalize.css @@ -0,0 +1,425 @@ +/*! normalize.css v3.0.1 | MIT License | git.io/normalize */ + +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + */ + +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/** + * Remove default margin. + */ + +body { + margin: 0; +} + +/* HTML5 display definitions + ========================================================================== */ + +/** + * Correct `block` display not defined for any HTML5 element in IE 8/9. + * Correct `block` display not defined for `details` or `summary` in IE 10/11 and Firefox. + * Correct `block` display not defined for `main` in IE 11. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +nav, +section, +summary { + display: block; +} + +/** + * 1. Correct `inline-block` display not defined in IE 8/9. + * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. + */ + +audio, +canvas, +progress, +video { + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ +} + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Address `[hidden]` styling not present in IE 8/9/10. + * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. + */ + +[hidden], +template { + display: none; +} + +/* Links + ========================================================================== */ + +/** + * Remove the gray background color from active links in IE 10. + */ + +a { + background: transparent; +} + +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ + +a:active, +a:hover { + outline: 0; +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Address styling not present in IE 8/9/10/11, Safari, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +/** + * Address styling not present in Safari and Chrome. + */ + +dfn { + font-style: italic; +} + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari, and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/** + * Address styling not present in IE 8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +/** + * Address inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove border when inside `a` element in IE 8/9/10. + */ + +img { + border: 0; +} + +/** + * Correct overflow not hidden in IE 9/10/11. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* Grouping content + ========================================================================== */ + +/** + * Address margin not present in IE 8/9 and Safari. + */ + +figure { + margin: 1em 40px; +} + +/** + * Address differences between Firefox and other browsers. + */ + +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} + +/** + * Contain overflow in all browsers. + */ + +pre { + overflow: auto; +} + +/** + * Address odd `em`-unit font size rendering in all browsers. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} + +/* Forms + ========================================================================== */ + +/** + * Known limitation: by default, Chrome and Safari on OS X allow very limited + * styling of `select`, unless a `border` property is set. + */ + +/** + * 1. Correct color not being inherited. + * Known issue: affects color of disabled elements. + * 2. Correct font properties not being inherited. + * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. + */ + +button, +input, +optgroup, +select, +textarea { + color: inherit; /* 1 */ + font: inherit; /* 2 */ + margin: 0; /* 3 */ +} + +/** + * Address `overflow` set to `hidden` in IE 8/9/10/11. + */ + +button { + overflow: visible; +} + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. + * Correct `select` style inheritance in Firefox. + */ + +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ +} + +/** + * Re-set default cursor for disabled elements. + */ + +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * Remove inner padding and border in Firefox 4+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +input { + line-height: normal; +} + +/** + * It's recommended that you don't attempt to style these elements. + * Firefox's implementation doesn't respect box-sizing, padding, or width. + * + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Fix the cursor style for Chrome's increment/decrement buttons. For certain + * `font-size` values of the `input`, it causes the cursor style of the + * decrement button to change from `default` to `text`. + */ + +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari and Chrome + * (include `-moz` to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/** + * Remove inner padding and search cancel button in Safari and Chrome on OS X. + * Safari (but not Chrome) clips the cancel button when the search input has + * padding (and `textfield` appearance). + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9/10/11. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Remove default vertical scrollbar in IE 8/9/10/11. + */ + +textarea { + overflow: auto; +} + +/** + * Don't inherit the `font-weight` (applied by a rule above). + * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. + */ + +optgroup { + font-weight: bold; +} + +/* Tables + ========================================================================== */ + +/** + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} + +td, +th { + padding: 0; +} diff --git a/css/syntax.css b/css/syntax.css new file mode 100644 index 0000000..2774b76 --- /dev/null +++ b/css/syntax.css @@ -0,0 +1,60 @@ +.highlight { background: #ffffff; } +.highlight .c { color: #999988; font-style: italic } /* Comment */ +.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.highlight .k { font-weight: bold } /* Keyword */ +.highlight .o { font-weight: bold } /* Operator */ +.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */ +.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ +.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #aa0000 } /* Generic.Error */ +.highlight .gh { color: #999999 } /* Generic.Heading */ +.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ +.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #555555 } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #aaaaaa } /* Generic.Subheading */ +.highlight .gt { color: #aa0000 } /* Generic.Traceback */ +.highlight .kc { font-weight: bold } /* Keyword.Constant */ +.highlight .kd { font-weight: bold } /* Keyword.Declaration */ +.highlight .kp { font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #009999 } /* Literal.Number */ +.highlight .s { color: #d14 } /* Literal.String */ +.highlight .na { color: #008080 } /* Name.Attribute */ +.highlight .nb { color: #0086B3 } /* Name.Builtin */ +.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */ +.highlight .no { color: #008080 } /* Name.Constant */ +.highlight .ni { color: #800080 } /* Name.Entity */ +.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */ +.highlight .nn { color: #555555 } /* Name.Namespace */ +.highlight .nt { color: #000080 } /* Name.Tag */ +.highlight .nv { color: #008080 } /* Name.Variable */ +.highlight .ow { font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mf { color: #009999 } /* Literal.Number.Float */ +.highlight .mh { color: #009999 } /* Literal.Number.Hex */ +.highlight .mi { color: #009999 } /* Literal.Number.Integer */ +.highlight .mo { color: #009999 } /* Literal.Number.Oct */ +.highlight .sb { color: #d14 } /* Literal.String.Backtick */ +.highlight .sc { color: #d14 } /* Literal.String.Char */ +.highlight .sd { color: #d14 } /* Literal.String.Doc */ +.highlight .s2 { color: #d14 } /* Literal.String.Double */ +.highlight .se { color: #d14 } /* Literal.String.Escape */ +.highlight .sh { color: #d14 } /* Literal.String.Heredoc */ +.highlight .si { color: #d14 } /* Literal.String.Interpol */ +.highlight .sx { color: #d14 } /* Literal.String.Other */ +.highlight .sr { color: #009926 } /* Literal.String.Regex */ +.highlight .s1 { color: #d14 } /* Literal.String.Single */ +.highlight .ss { color: #990073 } /* Literal.String.Symbol */ +.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */ +.highlight .vc { color: #008080 } /* Name.Variable.Class */ +.highlight .vg { color: #008080 } /* Name.Variable.Global */ +.highlight .vi { color: #008080 } /* Name.Variable.Instance */ +.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */ diff --git a/index.html b/index.html new file mode 100644 index 0000000..713723e --- /dev/null +++ b/index.html @@ -0,0 +1,43 @@ +--- +layout: home +title: Tyler Hallada +--- + +
+
+
+
+

Tyler Hallada

+
+
+
+
+
+ +
+
+
+
+
+
+

"The programmer, like the poet, + works only slightly removed from pure thought-stuff. He builds his + castles in the air, from air, creating by exertion of the + imagination."

— Fred Brooks

+
+
+
+
+
+
+
+

I am a Computer Science student at + Northeastern University + and I'm helping make healthcare in the US more efficient at + Kyruus as a Software Engineering + Co-op Intern.

+
+
+
+
+
diff --git a/js/magic.js b/js/magic.js new file mode 100644 index 0000000..a087d22 --- /dev/null +++ b/js/magic.js @@ -0,0 +1,242 @@ +window.onload = function () { + + /* Get the height and width of full document. To avoid browser + * incompatibility issues, choose the maximum of all height/width values. + * + * Method from http://stackoverflow.com/a/1147768 */ + function getDocumentDimensions() { + var body = document.body, + html = document.documentElement; + + var height = Math.max(body.scrollHeight, body.offsetHeight, + html.clientHeight, html.scrollHeight, + html.offsetHeight); + + var width = Math.max(body.scrollWidth, body.offsetWidth, + html.clientWidth, html.scrollWidth, + html.offsetWidth); + + return {"height": height, "width": width}; + } + + /* Specifies what will be added to the red, green, and blue values of the + * color at each interval. */ + function pickGradient() { + var directions = [-1, 0, 1]; + var magnitudes = [1, 2, 3]; + + return {"r": directions[Math.floor(Math.random() * 3)] * + magnitudes[Math.floor(Math.random() * 3)], + "g": directions[Math.floor(Math.random() * 3)] * + magnitudes[Math.floor(Math.random() * 3)], + "b": directions[Math.floor(Math.random() * 3)] * + magnitudes[Math.floor(Math.random() * 3)]}; + } + + /* Alters the given color by the given gradient and returns both. + + If the red, green, or blue value of the color is at 0 or 255 and the + gradient for that value is not zero, then the gradient for that value + will change signs. */ + function nextColor(color, gradient) { + var values = ["r", "g", "b"]; + + // Check if color at end of range and reverse gradient direction if so + for (var i = 0; i < 3; i++) { + var colorValue = color[values[i]]; + var gradientValue = gradient[values[i]]; + if ((colorValue === 255 && gradientValue > 0) || + (colorValue === 0 && gradientValue < 0)) { + gradient[values[i]] = gradientValue * -1; + } + } + + // Modify the color according to the gradient + for (i = 0; i < 3; i++) { + color[values[i]] = color[values[i]] + gradient[values[i]]; + } + + return {"color": color, "gradient": gradient}; + } + + /* Choose a random RGB color to begin the color gradient with */ + function pickRandomColor() { + return {"r": Math.floor(Math.random() * (255 + 1)), + "g": Math.floor(Math.random() * (255 + 1)), + "b": Math.floor(Math.random() * (255 + 1))}; + } + + /* Most of this funtion is provided by Maissan Inc. in their tutorial: + http://www.maissan.net/articles/simulating-vines */ + function drawTendrils(context, x, y, interations, sort, prune, prune_to) { + + // Set stroke colour + context.lineWidth = 0.5; + var color = pickRandomColor(); + context.strokeStyle = "rgb(" + color.r + "," + color.g + "," + color.b + ")"; + + // Create initial branch + var branches = []; + branches.push({ + points:new Array({x:x, y:y}, {x:x, y:y}, {x:x, y:y}, {x:x, y:y}), + angle:0, + //distanceToLattice:1000 + }); + + // Start drawing splines at t=0 + var t = 0; + + // Drawing interval + var interval = setInterval(function() { + + var gradient = pickGradient(); + + // Set stroke color + var newColor = nextColor(color, gradient); + color = newColor.color; + gradient = newColor.gradient; + context.strokeStyle = "rgb(" + color.r + "," + color.g + "," + color.b + ")"; + + // Draw branches + for (var i in branches) { + + // Draw spline segment + var ax = (-branches[i].points[0].x + 3*branches[i].points[1].x - 3*branches[i].points[2].x + branches[i].points[3].x) / 6; + var ay = (-branches[i].points[0].y + 3*branches[i].points[1].y - 3*branches[i].points[2].y + branches[i].points[3].y) / 6; + var bx = (branches[i].points[0].x - 2*branches[i].points[1].x + branches[i].points[2].x) / 2; + var by = (branches[i].points[0].y - 2*branches[i].points[1].y + branches[i].points[2].y) / 2; + var cx = (-branches[i].points[0].x + branches[i].points[2].x) / 2; + var cy = (-branches[i].points[0].y + branches[i].points[2].y) / 2; + var dx = (branches[i].points[0].x + 4*branches[i].points[1].x + branches[i].points[2].x) / 6; + var dy = (branches[i].points[0].y + 4*branches[i].points[1].y + branches[i].points[2].y) / 6; + context.beginPath(); + context.moveTo( + ax*Math.pow(t, 3) + bx*Math.pow(t, 2) + cx*t + dx, + ay*Math.pow(t, 3) + by*Math.pow(t, 2) + cy*t + dy + ); + context.lineTo( + ax*Math.pow(t+0.1, 3) + bx*Math.pow(t+0.1, 2) + cx*(t+0.1) + dx, + ay*Math.pow(t+0.1, 3) + by*Math.pow(t+0.1, 2) + cy*(t+0.1) + dy + ); + context.stroke(); + context.closePath(); + } + + // Advance t + t += 0.1; + + // When finished drawing splines, create a new set of branches + if (t >= 1) { + + // Create array to store next iteration of branchces + var new_branches = []; + + // Iterate over each branch + for (var j in branches) { + + // Replace with 2 new branches + for (var k = 0; k < 2; k++) { + + // Generate random deviation from previous angle + var angle = branches[j].angle - (Math.random() * 180 - 90); + + // Determine closest lattice point + //var distanceToLattice = 100000 + //for (var l in lattice) { + //var result = distancePointToLine(branches[j].points[3], lattice[l]); + //if (result < distanceToLattice) distanceToLattice = result; + //} + + // Generate random length + var length = Math.random() * 15 + 4; + + // Calculate new point + var x2 = branches[j].points[3].x + Math.sin(Math.PI * angle / 180) * length; + var y2 = branches[j].points[3].y - Math.cos(Math.PI * angle / 180) * length; + + // Add to new branch array + new_branches.push({ + points:new Array( + branches[j].points[1], + branches[j].points[2], + branches[j].points[3], + {x:x2, y:y2} + ), + angle:angle, + //distanceToLattice:distanceToLattice + }); + + } + } + + // Sort branches by distance to lattice + //new_branches.sort(function(a, b) { + //return a.distanceToLattice - b.distanceToLattice; + //}); + + // If over 10 branches, prune the branches + if (prune) { + if (sort) { + while (new_branches.length > 20) new_branches.pop(); + } else { + while (new_branches.length > prune_to) { + new_branches.splice(Math.floor(Math.random() * new_branches.length), 1); + } + } + } + + // Replace old branch array with new + branches = new_branches; + + // Restart drawing splines at t=0 + t = 0; + } + + // Count interations + interations--; + if (interations < 0) clearInterval(interval); + + }, 16.67); + + // Return interval + return interval; + } + + + function draw() { + // Initialize canvas + console.log("draw"); + var canvas = document.getElementById("magic"); + var dimensions = getDocumentDimensions(); + console.log(dimensions.height); + console.log(dimensions.width); + canvas.height = dimensions.height; + canvas.width = dimensions.width; + + // Check for canvas support and get context + if (canvas.getContext){ + var context = canvas.getContext("2d"); + + // Cast magic spells + var metaInterval = setInterval(function () { + // resize canvas if document size changed + dimensions = getDocumentDimensions(); + if ((dimensions.height !== canvas.height) || + (dimensions.width !== canvas.width)) { + console.log(dimensions.height); + console.log(dimensions.width); + canvas.height = dimensions.height; + canvas.width = dimensions.width; + } + + // Find random position + var x = Math.floor(Math.random() * (canvas.width + 1)); + var y = Math.floor(Math.random() * (canvas.height + 1)); + var duration = Math.floor(Math.random() * (600 - 50 + 1)) + 50; + var interval = drawTendrils(context, x, y, duration, false, true, 30); + }, 3000); + } + } + + draw(); +}; diff --git a/profile_icon_128x128.png b/profile_icon_128x128.png new file mode 100644 index 0000000..ef2a7f6 Binary files /dev/null and b/profile_icon_128x128.png differ