I hereby claim:
- I am scottymac on github.
- I am scottymac (https://keybase.io/scottymac) on keybase.
- I have a public key whose fingerprint is 36A4 DC4D 2E93 A124 8936 3E78 3BEA 3029 2C1D 2805
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
class UITextView #(Extensions) https://gist.github.com/brentsimmons/5810992/ | |
def stringCharacterIsAllowedAsPartOfLink(s) | |
if (s == nil || s.length < 1) | |
return false | |
end | |
ch = s.characterAtIndex(0) | |
if NSCharacterSet.whitespaceAndNewlineCharacterSet.characterIsMember(ch) | |
return false | |
end |
// | |
// XDSpinner.h | |
// Sparrow 2.X | |
// | |
// Created by Shilo White on 8/17/13. | |
// Copyright (c) 2013 XIDA Design & Technik. All rights reserved. | |
// | |
#import "SPDisplayObjectContainer.h" |
@mixin retina($ratio: 1.5) { | |
$dpi: $ratio * 96; | |
$opera-ratio: $ratio * 100; | |
@media only screen and (-webkit-min-device-pixel-ratio: #{$ratio}), | |
only screen and ( -o-min-device-pixel-ratio: '#{$opera-ratio}/100'), | |
only screen and ( min-resolution: #{$dpi}dpi), | |
only screen and ( min-resolution: #{$ratio}dppx) { | |
@content; | |
} |
if 'createTouch' of document | |
ignore = /:hover\b/ | |
try | |
for stylesheet in document.styleSheets | |
idxs = [] | |
# detect hover rules | |
for rule, idx in stylesheet.cssRules | |
if rule.type is CSSRule.STYLE_RULE and ignore.test(rule.selectorText) | |
idxs.unshift idx |
class Array | |
def to_enum | |
Array.new(self.size, &lambda { |n| self[n].is_a?(Hash) ? self[n] : {:"#{self[n]}" => n}} ).inject({}) {|m, w| m.merge!(w) } | |
end | |
end | |
FRUIT = [:apple, :orange, :strawberry].to_enum | |
puts FRUIT[:apple] | |
>> 0 |
// Variables.less | |
// Variables to customize the look and feel of Bootstrap | |
// ----------------------------------------------------- | |
// GLOBAL VALUES | |
// -------------------------------------------------- | |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
// custom validators | |
// generic validator for required input fields to work with validator() & [placeholder] | |
$.tools.validator.fn("input[required]", "Please complete this mandatory field.", function(input, value) { | |
var pass; | |
if ((value == "") || (value == $(input).attr("placeholder"))) { | |
$(input).addClass("invalid"); | |
pass = false; | |
} else { | |
$(input).removeClass("invalid"); |