Skip to content

Instantly share code, notes, and snippets.

View ryankinal's full-sized avatar

Ryan Kinal ryankinal

View GitHub Profile
@ryankinal
ryankinal / css-links.md
Created November 10, 2011 21:49
Useful CSS links for easy reference
@ryankinal
ryankinal / gist:1424559
Created December 2, 2011 19:44
An article on the use and misuse of CSS (in progress)

This is a beginning draft of a presentation on designing CSS, and best practices involved therein. My hope is to spread knowledge of good CSS practices, and continue discussion of concepts central to writing extensible, maintainable, and fast CSS. Yeah, a lot of this is discussed by Nicole Sullivan. Oh well.

Everybody uses CSS. It's just the way the web works. For developers, it makes our applications look pretty. For designers, it makes our designs concrete and usable. There's a problem, though: We rarely think about how our CSS itself is designed, and how that affects the speed, extensibility, and maintainability of whatever it is we're working on.

Developers who have the programming background to understand these concepts want to worry about the functionality of the application (CRUD, APIs, etc.). Designers want to worry about how the application looks and feels, rather than the structure of the code.

So, CSS is in this middle ground where developers don't want to think about it, and des

@ryankinal
ryankinal / un-dry
Created December 12, 2011 19:08
Several server-side function names in my work project :-(
moveNext
moveNextReview
moveNextSummary
moveNextInMastery
moveNextCyclePass
moveNextCycleFail
moveNextMastered
moveNextCompleted
@ryankinal
ryankinal / ids-in-css.md
Created December 13, 2011 21:40
Thoughts and points on the "IDs in CSS" issue

The whole ID thing

There is a war going on. In comment threads and chat rooms, we are doing battle.

Here are the arguments against IDs:

  • specificity wars
  • strong coupling
  • code reusability
  • abstraction
@ryankinal
ryankinal / to-learn.md
Created December 22, 2011 21:39
Libraries to learn. Because apparently I don't know enough of them.
  • MooTools
  • Prototype
  • YUI
  • Glow
  • Dojo
  • Processing
  • ExtJS
  • Raphael
  • RightJS
  • ThreeJS
@ryankinal
ryankinal / time-parser.js
Created February 7, 2012 16:30
time parser for SCORM-formatted times
/*
Strings of format PNYNMNDTNHNMNS where N is a number.
What the number represents is determined by the letter
immediately following the number.
Y: years
M: before the "T", months; after the "T", minutes
D: days
H: hours
S: seconds
*/
@ryankinal
ryankinal / no-four.sql
Created February 13, 2012 19:44
No fours here. Dammit.
CREATE PROCEDURE spGetChatUsersFlagged
@threshold int
AS
BEGIN
SET NOCOUNT ON;
SELECT DISTINCT
Students.username,
Students.StudentID,
COUNT(flagID) AS FlagCount
@ryankinal
ryankinal / vendor-prefixes.md
Created February 20, 2012 15:33
My thoughts on this browser-prefix thing.

Originally posted on Google+, for lack of a better place

Most of you wan't care about this post. Heck, a large portion of you won't likely know what it's about.

What it is about is CSS vendor prefixes. There has been a lot said over the past week on the subject, and while I don't think there has been a perfect solution, I also don't think a perfect solution is possible. Basically, we're shooting for least bad here. There have been several proposed.

Stop it.

Specifically, developers should stop using prefixed properties on production sites. These properties are prefixed for a reason. They're not yet a standard. They're still in flux. Which means that when they do change, your site will break. Is that something you want? I know I don't.

function isJavaScriptEnabled(){
if(navigator.javaEnabled()){
var en = "Enabled";
document.cookie ="myjavacookie=Enabled";
document.getElementById("ctl00_ctl00_MasterContent_MasterContent_javaScriptHiddenField").value = en;
@ryankinal
ryankinal / overloads.js
Created April 23, 2012 17:26
Silly .NET developer
/** I need a function for some stuff **/
function GetParentOfType(element, type) {
if (element == null)
return null
while (element.nodeName != type) {
if (element.parentElement == null) {
return null;
}
element = element.parentElement;
}