Skip to content

Instantly share code, notes, and snippets.

View esteinborn's full-sized avatar

Eric Steinborn esteinborn

View GitHub Profile
@esteinborn
esteinborn / github-for-cats-notes.md
Created October 18, 2013 00:27
notes for my GH pres

Notes for github presentation

Set up outline of pres

Don't go overboard on details, KISS

Merge conflicts need to be mentioned but not a lot of time should be spent on them

@esteinborn
esteinborn / ios-homescreen-launch-check.js
Created October 28, 2013 17:58
Have you launched this site from your homescreen?
if (window.navigator.userAgent.indexOf('iPhone') != -1) {
if (window.navigator.standalone === true) {
// Initialize your app
}else{
// Display a message asking to add the app to the Home Screen
}
}else{
document.location.href = 'please-open-from-an-iphone.html';
}
@esteinborn
esteinborn / _rem-fallback.scss
Created January 28, 2014 18:03
Rem Fallback
/* Set up a variable for maths */
$doc-font-size: 16;
/* the font-size mixin */
@mixin font-size($size) {
font-size: 0px + $size;
font-size: 0rem + $size / $doc-font-size;
}
@esteinborn
esteinborn / todo.md
Last active August 29, 2015 13:55
INF 362 To Do List

General To Do.

  • Add grades from individual rats and group rats to blackboard
  • Get help with adding grades to blackboard
  • Email Ray: need a short 15 minute presentation introducing the project and its goals
    • Ray will provide.
  • Look through course books to find the chapters that students should need to read for assignments
  • Find inspiring design posts
  • Email Jen about info on internships
  • Create repos for all units
@esteinborn
esteinborn / SassMeister-input-HTML.html
Created March 2, 2014 14:35
Generated by SassMeister.com.
<h1>Hello World!</h1>
<p class="retina-test"></p>
<a href="javascript:void((function(d){if(self!=top||d.getElementById(&#039;toolbar&#039;)&amp;&amp;d.getElementById(&#039;toolbar&#039;).getAttribute(&#039;data-resizer&#039;))return false;d.write(&#039;&lt;!DOCTYPE HTML&gt;&lt;html style=&quot;opacity:0;&quot;&gt;&lt;head&gt;&lt;meta charset=&quot;utf-8&quot;/&gt;&lt;/head&gt;&lt;body&gt;&lt;a data-viewport=&quot;320x480&quot; data-icon=&quot;mobile&quot;&gt;Mobile (e.g. Apple iPhone)&lt;/a&gt;&lt;a data-viewport=&quot;320x568&quot; data-icon=&quot;mobile&quot; data-version=&quot;5&quot;&gt;Apple iPhone 5&lt;/a&gt;&lt;a data-viewport=&quot;600x800&quot; data-icon=&quot;small-tablet&quot;&gt;Small Tablet&lt;/a&gt;&lt;a data-viewport=&quot;768x1024&quot; data-icon=&quot;tablet&quot;&gt;Tablet (e.g. Apple iPad 2-3rd, mini)&lt;/a&gt;&lt;a data-viewport=&quot;1280x800&quot; data-icon=&quot;notebook&quot;&gt;Widescreen&lt;/a&gt;&lt;a data-viewport=&quot;1920&times;1080&quot; data-icon=&quot;tv&quot;&gt;HDTV 10
@esteinborn
esteinborn / preferences.sublime-settings
Created March 5, 2014 03:57
Sublime Text Home config
{
"color_scheme": "Packages/User/Flatland Monokai (SL).tmTheme",
"detect_indentation": false,
"file_exclude_patterns":
[
"*.pyc",
"*.pyo",
"*.exe",
"*.dll",
"*.obj",
@esteinborn
esteinborn / tips.md
Last active August 29, 2015 13:57
Web Developer Tips - INF 362 Ver 1

Sublime Text Info:

  • Download link: http://www.sublimetext.com/3
  • ST Super Course
  • Install Package Control: https://sublime.wbond.net/installation
    • Copy Install script from there (choose ST2 or ST3 first)
    • Open ST and press CTRL+~ to open the console
    • Paste the install script in the console and press enter
    • Restart ST
  • Here is my list of personally installed plugins. Bolded ones are really useful (CTRL+Shift+P > Install)
  • AdvancedNewFile
@esteinborn
esteinborn / jquery-touch-or-click.js
Created March 6, 2014 20:19
Detect whether its a touch or click even that should be fired. jQuery.
// This checks document to see if touchstart exists
// if it does, then your event is 'touchstart'
// if it doesn't (most desktop browsers) then its 'click'.
var clickEventType = ((document.ontouchstart!==null)?'click':'touchstart');
// Old .bind don't use
$('.foo').bind(clickEventType, function(e){});
//Better yet, use .on() for binding:
$('body').on(clickEventType, '.foo', function(e){});
@esteinborn
esteinborn / Default (Windows).sublime-keymap
Last active June 8, 2016 15:37
My Sublime Text Snippets and Config
[
{ "keys": ["home"], "command": "move_to", "args": {"to": "hardbol", "extend": false} },
{ "keys": ["end"], "command": "move_to", "args": {"to": "hardeol", "extend": false} },
{ "keys": ["shift+end"], "command": "move_to", "args": {"to": "hardeol", "extend": true} },
{ "keys": ["ctrl+home"], "command": "move_to", "args": {"to": "hardbof", "extend": false} }
]
@esteinborn
esteinborn / picturefill.sublime-snippet
Created March 7, 2014 17:30
Picturefill Sublime Snippet
<snippet>
<content><![CDATA[
<span ${1:class="${2}"} data-picture data-alt="${3:Moar Internets!}">
<span data-src="${4:file}${5:.jpg}"></span>
<span data-src="${4:file}-x2${5:.jpg}" ${6:data-media="(${7:min-width}: ${8:400px})"}></span>
<span data-src="${4:file}-x3${5:.jpg}" ${9:data-media="(${10:min-width}: ${11:800px})"}></span>
</span>
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>pic</tabTrigger>