Skip to content

Instantly share code, notes, and snippets.

@Shpigford
Shpigford / dabblet.css
Created July 9, 2012 16:41
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
.outter {
background:red;
padding:5px;
position:relative;
}
.middle {
def receive_email
from = find_email(params["from"]).downcase
tracking_number = Tracking::Extractor.extract(params["text"])
if tracking_number.blank?
PostOffice.email_tracking_failure(from, "We could not find a valid tracking number in your email.").deliver
else
tracking_number.each do |tracking|
user = User.first(:conditions => ["email_forwards LIKE ?", "%#{from}%"])
$.fn.fauxPlaceholder = function(){
return this.each(function(){
$(this)
.click(function(){
$(this).find("label").hide();
$(this).find('input').focus();
}).find("input").focus(function(){
$(this).prev('label').hide();
}).blur(function(){
if (!$(this).val()){
// Gradient button mixin
@mixin gradient_button($color) {
@include background-image(linear-gradient($color, darken($color, 5%)));
@include border-radius(4px);
@include box-shadow(inset 0 1px 0 rgba(white,0.2),inset 0 0 5px rgba(black,0.2));
border: 1px solid rgba(black,0.3);
text-shadow: 0 1px 0 rgba(black,0.2);
color: white;
font-size: 116%;
text-decoration: none;
@Shpigford
Shpigford / dabblet.css
Created June 18, 2012 13:34
z-index issue
/* z-index issue */
.img {
background:#fff;
position:relative;
width:500px;
height:344px;
border:1px solid black;
padding:10px;
}
@Shpigford
Shpigford / dabblet.css
Created June 18, 2012 13:31
z-index issue
/* z-index issue */
.img {
background:#fff;
z-index:10;
position:relative;
width:500px;
height:344px;
border:1px solid black;
padding:10px;
}
div {
background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzBlMWIzMSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzBhMTMyMiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #0e1b31), color-stop(100%, #0a1322));
background: -webkit-linear-gradient(top, #0e1b31,#0a1322);
background: -moz-linear-gradient(top, #0e1b31,#0a1322);
background: -o-linear-gradient(top, #0e1b31,#0a1322);
background: -ms-linear-gradient(top, #0e1b31,#0a1322);
background: linear-gradient(top, #0e1b31,#0a1322);
}
@Shpigford
Shpigford / clockwork.rake
Created September 15, 2011 01:05 — forked from andrewvc/clockwork.rake
Using the Clockwork gem from a rake task
task :clockwork => :environment do
Clockwork.every(10.seconds, "events.update_viewers") {
Resque.enqueue(ViewerCountWorker)
}
Clockwork.run
end
$dude: 'maxvoltar';
@mixin booyah_sauce {
p {
@if $dude == 'maxvoltar' {
color: rgba(#000, 0.5);
} @else if $dude == 'mr_super_awesomeness' {
color: rgba(black, 0.5);
}
}
}
.blog {
header[role="banner"] {
hgroup {
h2 {
font-size: 5em;
}
}
}
}