Skip to content

Instantly share code, notes, and snippets.

@madzak
madzak / Email Remark
Created January 31, 2012 17:41
Can we make this more offensive?
I think it is unreasonable to have a lower level engineer make design changes which violate the key design intent of the Senior Principal Enterprise architect and one of our most senior principals and I do not think we should proliferate multiple implementations.
@coreyti
coreyti / console.css
Created February 3, 2012 22:16
js & css to send window.console calls to the web page
ul.console {
font-size : 0.85em;
color : #FFF;
text-shadow : 0 1px #000;
position : fixed;
top : 70%;
right : 10px;
z-index : 10000;
width : 200px;
height : 25%;
@jcroft
jcroft / input.sass
Created February 6, 2012 21:51
What I really want in Sass: a syntax for doing media queries inside a selector or mixin...
// Typical grid column mixin..
=column($percent)
width: $percent
float: left
// Fancy new pseudo-selector syntax for media queries which would let my
// column from above switch to 100% when the window got narrower than 600px...
&@media only screen and (min-width: 600px)
width: 100%
@segdeha
segdeha / gist:1808873
Created February 12, 2012 14:40
Bookmarklet for deleting promoted Twitter content
javascript:$('.promoted-tweet').parent().fadeOut(500,function(){$(this).remove()});$('.promoted-account,.promoted-trend').fadeOut(500,function(){$(this).remove()});
@gcatlin
gcatlin / gist:1847248
Created February 16, 2012 19:43
Install specific version of Homebrew formula
brew update
brew versions FORMULA
cd `brew --prefix`
git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions"
brew install FORMULA
brew switch FORMULA VERSION
git checkout -- Library/Formula/FORMULA.rb # reset formula
## Example: Using Subversion 1.6.17
#
if (typeof (AC) === "undefined") {
AC = {}
}
AC.ImageReplacer = Class.create({
_defaultOptions: {
listenToSwapView: true,
filenameRegex: /(.*)(\.[a-z]{3}($|#.*|\?.*))/i,
filenameInsert: "_☃x",
ignoreCheck: /(^http:\/\/movies\.apple\.com\/|\/105\/|\/global\/elements\/quicktime\/|_(([2-9]|[1-9][0-9]+)x|nohires)(\.[a-z]{3})($|#.*|\?.*))/i,
attribute: "data-hires",
@grigs
grigs / browserdetect.js
Created March 13, 2012 17:12
Apple's Browser Detection Script - prettified from http://images.apple.com/global/scripts/browserdetect.js
if (typeof (AC) === "undefined") {
AC = {}
}
AC.Detector = {
getAgent: function () {
return navigator.userAgent.toLowerCase()
},
isMac: function (c) {
var d = c || this.getAgent();
return !!d.match(/mac/i)
@lancejpollard
lancejpollard / table.rb
Created March 30, 2012 00:31
Ascii Table for StackOverflow (since you can't use <table> tags on StackOverflow...)
# encoding: UTF-8
require 'rubygems'
require 'terminal-table'
headings = ['', 'A', 'B']
def rows ; @rows ||= [] ; end
def row(*args) ; rows << args end
def no ; "" ; end # "✗"
@jonathantneal
jonathantneal / iDevice.viewport.scaling.js
Created April 6, 2012 17:05
iDevice Viewport Scaling
/iPad|iPhone/.test(navigator.platform) && (function (window, document) {
var
width = 'width', height = 'height',
// get <html>
documentElement = document.documentElement,
// get fake <head>
fakeHead = document.createElement('head'),
// get orientation
orientation = window.orientation % 180,
// get scaling
@unclebob
unclebob / apology.
Created April 27, 2012 12:19
Apology to Women Programmers.
Today I gave a keynote at ACCU in Oxford. In the midst of it I made two (count them) two statements that I should have known better than to make. I was describing the late '70s, and the way we felt about the C language at the time. My slide said something like: "C was for real men." Emily Bache, whom I know and hold in high regard, spoke up and said "What about women?". And I said something like: "We didn't allow women in those days." It was a dumb crack, and should either not have been said, or should have been followed up with a statement to the effect that that was wrong headed.
The second mistake I made was while describing Cobol. I mentioned Adm. Grace Hopper. I said something like "May she rest in peace." I don't know that any of the words were actually demeaning, but the tone was not as respectful as it should have been to an Admiral in the United State Navy, and one who was so instrumental in our industry; despite what I feel about Cobol.
I am a 59 year old programmer who was brought up