Skip to content

Instantly share code, notes, and snippets.

View dandean's full-sized avatar
🌧️
It's raining.

Dan Dean dandean

🌧️
It's raining.
View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Pure CSS Vertical Centering via CSS3 Flexible Box Model</title>
<style type="text/css" media="screen">
html {
height: 100%;
}
body {
$("myloader").show();
new Ajax.Request('/your/url', {
onComplete: function(response) {
$("myloader").hide();
}
});
3258 characters for a checkbox!
http://ukijs.org/examples/core-examples/controls/
document.querySelectorAll("div")[106].outerHTML.length --> 3258
<div style="position: absolute; z-index: 100; font-family: Arial, Helvetica, sans-serif; color: rgb(51, 51, 51); text-align: center; font-weight: bold; -webkit-user-select: none; cursor: default; left: 250px; top: 35px; width: 24px; height: 24px; "><div style="position: absolute; z-index: 100; font-family: Arial, Helvetica, sans-serif; font-size: 12px; white-space: nowrap; font-weight: bold; line-height: 24px; left: 4px; top: 0px; right: 4px; bottom: 0px; "></div><div style="left: 0px; top: 0px; width: 100%; height: 100%; position: absolute; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIHWNgAAIAAAUAAY27m/MAAAAASUVORK5CYII=); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: initial initial; "
so my workflow is that each ticket gets a branch. Before merging the branch to master
it needs to be peer-reviewed. So sometimes I have a bunch of branches that are off
being reviewed while I work on something else.
Currently when I run "git branch" I see:
[branch 1]
[branch 2]
[branch 3]
*[branch 4]
[branch 5]
<!DOCTYPE html>
<html>
<head>
<title>Does Prototype's Element.Layout pull transformed values? Not yet.</title>
<style type="text/css" media="screen">
div#stage {
width: 100px;
height: 100px;
background: #CCC;
-webkit-transform-origin: left top;

(This is the text of the keynote I gave at Startup Riot 2009. Will update when video becomes available.)

Hi everyone, I’m Chris Wanstrath, and I’m one of the co-founders of GitHub.

GitHub, if you haven’t heard of it, has been described as “Facebook for developers.” Which is great when talking about GitHub as a website, but not so great when describing GitHub as a business. In fact, I think we’re the polar opposite of Facebook as a business: we’re small, never took investment, and actually make money. Some have even called us successful.

Which I’ve always wondered about. Success is very vague, right? Probably even relative. How do you define it?

After thinking for a while I came up with two criteria. The first is profitability. We employ four people full time, one person part time, have thousands of paying customers, and are still growing. In fact, our rate of growth is increasing – which means January was our best month so far, and February is looking pretty damn good.

#!/bin/bash
show=
xport=
upload=
newfiles=0
while getopts 'oeu' OPTION
do
case $OPTION in
o) show=1
window.__doPostBack = window.__doPostBack.wrap(function(original) {
var name = arguments[1],
argument = arguments[2] || "",
// Convert name to ID. Strip extranious garbage off of the end.
id = name.replace(/\$/g, '_').replace(/_ctl00$/, ''),
element = $(id);
if (element.hasClassName("ajax")) {
// Make the ajax request.
var form = element.up("form"),
heh, this already exists:
http://api.prototypejs.org/dom/element.html#toggle-class_method
// Untested. Requires Prototype >= 1.6
//
// Copyright (c) 2009 Tobie Langel
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: