This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section class="gallery"> | |
<img src="/media/slide.jpg" alt="Alt Text" width="600" data-text="Slide Text" /> | |
<img src="/media/slide.jpg" alt="Alt Text" width="600" data-text="Slide Text 2" /> | |
<div class="detail"></div> | |
<nav> | |
<a href="#" class="ir next" title="Next">Next</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
perl -pi -e 's/:([\w\d_]+)(\s*)=>/\1:/g' **/*.rb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def recurring_text(self): | |
days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", | |
"Friday", "Saturday"] | |
weeks = ["first", "second", "third", "fourth", "fifth"] | |
ret = "" | |
# Daily | |
if self.recurring_type == '2': | |
ret += "Daily" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add a reference to the original repo | |
git remote add --track <branch> upstream git://github.com/<original-repo>.git | |
# verify you added it | |
git remote | |
# fetch the changes | |
git fetch upstream | |
# merge it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ProductFinder < ActiveRecord::Base | |
class << self | |
def search(miles, zip, brand=nil, storeType=nil) | |
now = DateTime.now.utc | |
d = now.strftime("%d") | |
params = "action=results&zip=#{zip}&miles=#{miles}" | |
params += "&brand=#{brand}" unless brand.blank? | |
params += "&storeType=#{storeType}" unless storeType.blank? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@-webkit-keyframes killerdiller { | |
from { -webkit-transform: rotate(-45deg); } | |
to { -webkit-transform: rotate(360deg); } | |
} | |
body | |
{ | |
-webkit-animation: killerdiller 0.5s infinite; | |
-webkit-animation-timing-function: linear; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Custom Select plugin */ | |
(function($){ | |
$.fn.extend({ | |
customSelect: function(opts) { | |
if(!$.browser.msie || ($.browser.msie&&$.browser.version > 6)){ | |
return this.each(function() { | |
var $el = $(this), cur = $el.find(':selected'); | |
$el.after('<span class="' + $el.attr('class') + '"><span class="inner">' + cur.text() + '</span></span>') | |
.css({ position:'absolute', opacity:0, fontSize:$el.next().css('font-size') }); | |
var span = $el.next(), inner = span.find(':first-child'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Pie | |
*/ | |
#pie { position: relative; float: left; width: 374px; height: 374px; margin: 0; padding: 0; } | |
#pie ul { list-style-type: none; width: 374px; height: 374px; padding: 0; margin: 0; } | |
#pie li { position: absolute; top: 0px; width: 374px; height: 374px; padding: 0; margin: 0; } | |
#pie p { width: 374px; height: 374px; padding: 0; margin: 0; } | |
#pie span { display: block; width: 187px; height: 374px;} | |
#pie ul :nth-child(odd) { clip: rect(0px, 374px, 374px, 187px);} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var canvas = document.getElementById('kettle'), | |
ctx = canvas[0].getContext('2d'); | |
ctx.save(); | |
ctx.beginPath(); | |
ctx.moveTo(0.0, 0.0); | |
ctx.lineTo(155.6, 0.0); | |
ctx.bezierCurveTo(155.6, 0.0, 155.3, 62.1, 155.3, 80.7); | |
ctx.lineTo(155.3, 244.2); | |
ctx.bezierCurveTo(155.3, 294.2, 198.5, 319.9, 276.3, 319.9); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) --> | |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | |
<svg version="1.1" id="kettle" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="529" height="387" > | |
<g> | |
<defs> | |
<rect id="SVGID_1_" width="529" height="387"/> | |
</defs> | |
<clipPath id="SVGID_2_"> |