Skip to content

Instantly share code, notes, and snippets.

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Nice Buttons</title>
<style>
* { margin: 0; padding: 0; }
ul {
padding: 20px;
width: 80px;
float: left;
@vigo
vigo / ruby-tips.md
Created November 4, 2012 22:50
Ruby Tips

Ruby Tips

Genel

  • Herşey bir Object (Nesne)
  • Her Object BasicObjectden türemiş. (Objective-C NSObject gibi...)
  • Object.methods ile o nesneye ait tüm method'lar
  • Object.methods.inspect string olarak method'lar
  • Mutlaka bir şey geriye döner. Hiçbir şey dönmese nil döner.

Style Guide

// HTML:
<div class="display-type"></div>
// CSS:
// set the content of an element depending on the media query
require 'rss'
require 'open-uri'
titles = []
open('http://safran-beta.herokuapp.com/feed.rss') { |rss| titles = RSS::Parser.parse(rss).items.collect(&:title) }
`say Safranda bugün`
titles.each{|title| `say "#{title.gsub(/"/,'').squeeze(' ')}"`; sleep 0.5}
@jonathantneal
jonathantneal / README.md
Last active September 26, 2024 18:30
Fluid Aspect: A Sass mixin for creating intrinsic ratios

Fluid Aspect

fluid-aspect is a Sass mixin for creating intrinsic ratios in CSS. Intrinsic ratios allow elements to fill the width of their containing block and resize on the fly while maintaining their aspect ratio.

@include fluid-aspect($ratio, [$target]);
  • $ratio: An aspect ratio represented as two numbers separated by a space. Defaults to 1:1
  • $target: A selector targeting the element to be made fluid. Defaults to "> :first-child"